Patch to compile, downgrade Kotlin version, otherwise it fails with useless message, disable incremental kapt otherwise it fails

This commit is contained in:
Alibek Omarov 2020-05-03 04:28:26 +03:00
parent bf62187fe2
commit 8641b0f220
12 changed files with 10 additions and 28 deletions

View File

@ -22,7 +22,7 @@ def buildnum = {
android { android {
compileSdkVersion 29 compileSdkVersion 29
ndkVersion "20.1.5948944" //ndkVersion "20.1.5948944"
defaultConfig { defaultConfig {
applicationId APP_ID applicationId APP_ID
minSdkVersion 21 minSdkVersion 21

View File

@ -31,7 +31,6 @@ import com.keylesspalace.tusky.entity.Emoji;
import com.keylesspalace.tusky.entity.Status; import com.keylesspalace.tusky.entity.Status;
import com.keylesspalace.tusky.interfaces.StatusActionListener; import com.keylesspalace.tusky.interfaces.StatusActionListener;
import com.keylesspalace.tusky.util.CustomEmojiHelper; import com.keylesspalace.tusky.util.CustomEmojiHelper;
import com.keylesspalace.tusky.util.HtmlUtils;
import com.keylesspalace.tusky.util.ImageLoadingHelper; import com.keylesspalace.tusky.util.ImageLoadingHelper;
import com.keylesspalace.tusky.util.LinkHelper; import com.keylesspalace.tusky.util.LinkHelper;
import com.keylesspalace.tusky.util.StatusDisplayOptions; import com.keylesspalace.tusky.util.StatusDisplayOptions;
@ -42,7 +41,6 @@ import com.keylesspalace.tusky.viewdata.PollOptionViewData;
import com.keylesspalace.tusky.viewdata.PollViewData; import com.keylesspalace.tusky.viewdata.PollViewData;
import com.keylesspalace.tusky.viewdata.PollViewDataKt; import com.keylesspalace.tusky.viewdata.PollViewDataKt;
import com.keylesspalace.tusky.viewdata.StatusViewData; import com.keylesspalace.tusky.viewdata.StatusViewData;
import com.mikepenz.iconics.utils.Utils;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;

View File

@ -26,7 +26,6 @@ import androidx.recyclerview.widget.RecyclerView
import com.keylesspalace.tusky.R import com.keylesspalace.tusky.R
import com.keylesspalace.tusky.entity.Emoji import com.keylesspalace.tusky.entity.Emoji
import com.keylesspalace.tusky.util.CustomEmojiHelper import com.keylesspalace.tusky.util.CustomEmojiHelper
import com.keylesspalace.tusky.util.HtmlUtils
import com.keylesspalace.tusky.util.visible import com.keylesspalace.tusky.util.visible
import com.keylesspalace.tusky.viewdata.PollOptionViewData import com.keylesspalace.tusky.viewdata.PollOptionViewData
import com.keylesspalace.tusky.viewdata.buildDescription import com.keylesspalace.tusky.viewdata.buildDescription

View File

@ -306,7 +306,7 @@ class SearchStatusesFragment : SearchFragment<Pair<Status, StatusViewData.Concre
} }
R.id.status_mute_conversation -> { R.id.status_mute_conversation -> {
searchAdapter.getItem(position)?.let { foundStatus -> searchAdapter.getItem(position)?.let { foundStatus ->
viewModel.muteConversation(foundStatus, status.muted != true) viewModel.muteConversation(foundStatus.first, status.muted != true)
} }
return@setOnMenuItemClickListener true return@setOnMenuItemClickListener true
} }

View File

@ -29,6 +29,7 @@ import com.keylesspalace.tusky.entity.Emoji
import com.keylesspalace.tusky.entity.Poll import com.keylesspalace.tusky.entity.Poll
import com.keylesspalace.tusky.entity.Status import com.keylesspalace.tusky.entity.Status
import com.keylesspalace.tusky.json.SpannedTypeAdapter import com.keylesspalace.tusky.json.SpannedTypeAdapter
import com.keylesspalace.tusky.util.trimTrailingWhitespace
import java.net.URLDecoder import java.net.URLDecoder
import java.net.URLEncoder import java.net.URLEncoder
import java.util.* import java.util.*

View File

@ -81,10 +81,4 @@ class AppModule {
AppDatabase.MIGRATION_22_23, AppDatabase.MIGRATION_23_24) AppDatabase.MIGRATION_22_23, AppDatabase.MIGRATION_23_24)
.build() .build()
} }
@Provides
@Singleton
fun providesHtmlConverter(): HtmlConverter {
return HtmlConverterImpl()
}
} }

View File

@ -101,11 +101,3 @@ data class PleromaAccount(
@SerializedName("is_moderator") val isModerator: Boolean? = null, @SerializedName("is_moderator") val isModerator: Boolean? = null,
@SerializedName("is_admin") val isAdmin: Boolean? = null @SerializedName("is_admin") val isAdmin: Boolean? = null
) )
object SpannedParceler : Parceler<Spanned> {
override fun create(parcel: Parcel): Spanned = HtmlUtils.fromHtml(parcel.readString())
override fun Spanned.write(parcel: Parcel, flags: Int) {
parcel.writeString(HtmlUtils.toHtml(this))
}
}

View File

@ -19,17 +19,15 @@ import android.os.Parcelable
import com.google.gson.annotations.SerializedName import com.google.gson.annotations.SerializedName
import kotlinx.android.parcel.Parcelize import kotlinx.android.parcel.Parcelize
@Parcelize
data class Emoji( data class Emoji(
val shortcode: String, val shortcode: String,
val url: String, val url: String,
@SerializedName("visible_in_picker") val visibleInPicker: Boolean? @SerializedName("visible_in_picker") val visibleInPicker: Boolean?
) : Parcelable )
@Parcelize
data class EmojiReaction( data class EmojiReaction(
val name: String, val name: String,
val count: Int, val count: Int,
val me: Boolean, val me: Boolean,
val accounts: List<Account>? // only for emoji_reactions_by val accounts: List<Account>? // only for emoji_reactions_by
) : Parcelable )

View File

@ -651,7 +651,7 @@ public class NotificationsFragment extends SFragment implements
NotificationViewData.Concrete newViewData = new NotificationViewData.Concrete( NotificationViewData.Concrete newViewData = new NotificationViewData.Concrete(
viewdata.getType(), viewdata.getId(), viewdata.getAccount(), viewdata.getType(), viewdata.getId(), viewdata.getAccount(),
viewDataBuilder.createStatusViewData(), viewdata.isExpanded(), viewdata.getEmoji()); viewDataBuilder.createStatusViewData(), viewdata.getEmoji());
notifications.setPairedItem(position, newViewData); notifications.setPairedItem(position, newViewData);
} }
@ -1362,7 +1362,7 @@ public class NotificationsFragment extends SFragment implements
NotificationViewData.Concrete newViewData = new NotificationViewData.Concrete( NotificationViewData.Concrete newViewData = new NotificationViewData.Concrete(
viewdata.getType(), viewdata.getId(), viewdata.getAccount(), viewdata.getType(), viewdata.getId(), viewdata.getAccount(),
ViewDataUtils.statusToViewData(newStatus, false, false), viewdata.isExpanded(), viewdata.getEmoji()); ViewDataUtils.statusToViewData(newStatus, false, false), viewdata.getEmoji());
notifications.setPairedItem(position, newViewData); notifications.setPairedItem(position, newViewData);
updateAdapter(); updateAdapter();

View File

@ -22,7 +22,6 @@ import androidx.core.text.parseAsHtml
import com.keylesspalace.tusky.R import com.keylesspalace.tusky.R
import com.keylesspalace.tusky.entity.Poll import com.keylesspalace.tusky.entity.Poll
import com.keylesspalace.tusky.entity.PollOption import com.keylesspalace.tusky.entity.PollOption
import com.keylesspalace.tusky.util.HtmlUtils
import java.util.* import java.util.*
import kotlin.math.roundToInt import kotlin.math.roundToInt

View File

@ -1,5 +1,5 @@
buildscript { buildscript {
ext.kotlin_version = '1.3.70' ext.kotlin_version = '1.3.61'
repositories { repositories {
google() google()
jcenter() jcenter()

View File

@ -17,3 +17,4 @@ org.gradle.parallel=true
android.enableR8.fullMode=true android.enableR8.fullMode=true
android.useAndroidX=true android.useAndroidX=true
kapt.incremental.apt=false