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 {
compileSdkVersion 29
ndkVersion "20.1.5948944"
//ndkVersion "20.1.5948944"
defaultConfig {
applicationId APP_ID
minSdkVersion 21

View File

@ -31,7 +31,6 @@ import com.keylesspalace.tusky.entity.Emoji;
import com.keylesspalace.tusky.entity.Status;
import com.keylesspalace.tusky.interfaces.StatusActionListener;
import com.keylesspalace.tusky.util.CustomEmojiHelper;
import com.keylesspalace.tusky.util.HtmlUtils;
import com.keylesspalace.tusky.util.ImageLoadingHelper;
import com.keylesspalace.tusky.util.LinkHelper;
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.PollViewDataKt;
import com.keylesspalace.tusky.viewdata.StatusViewData;
import com.mikepenz.iconics.utils.Utils;
import java.text.SimpleDateFormat;
import java.util.Date;

View File

@ -26,7 +26,6 @@ import androidx.recyclerview.widget.RecyclerView
import com.keylesspalace.tusky.R
import com.keylesspalace.tusky.entity.Emoji
import com.keylesspalace.tusky.util.CustomEmojiHelper
import com.keylesspalace.tusky.util.HtmlUtils
import com.keylesspalace.tusky.util.visible
import com.keylesspalace.tusky.viewdata.PollOptionViewData
import com.keylesspalace.tusky.viewdata.buildDescription
@ -118,4 +117,4 @@ class PollViewHolder(view: View): RecyclerView.ViewHolder(view) {
val radioButton: RadioButton = view.findViewById(R.id.status_poll_radio_button)
val checkBox: CheckBox = view.findViewById(R.id.status_poll_checkbox)
}
}

View File

@ -306,7 +306,7 @@ class SearchStatusesFragment : SearchFragment<Pair<Status, StatusViewData.Concre
}
R.id.status_mute_conversation -> {
searchAdapter.getItem(position)?.let { foundStatus ->
viewModel.muteConversation(foundStatus, status.muted != true)
viewModel.muteConversation(foundStatus.first, status.muted != 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.Status
import com.keylesspalace.tusky.json.SpannedTypeAdapter
import com.keylesspalace.tusky.util.trimTrailingWhitespace
import java.net.URLDecoder
import java.net.URLEncoder
import java.util.*

View File

@ -81,10 +81,4 @@ class AppModule {
AppDatabase.MIGRATION_22_23, AppDatabase.MIGRATION_23_24)
.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_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 kotlinx.android.parcel.Parcelize
@Parcelize
data class Emoji(
val shortcode: String,
val url: String,
@SerializedName("visible_in_picker") val visibleInPicker: Boolean?
) : Parcelable
)
@Parcelize
data class EmojiReaction(
val name: String,
val count: Int,
val me: Boolean,
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(
viewdata.getType(), viewdata.getId(), viewdata.getAccount(),
viewDataBuilder.createStatusViewData(), viewdata.isExpanded(), viewdata.getEmoji());
viewDataBuilder.createStatusViewData(), viewdata.getEmoji());
notifications.setPairedItem(position, newViewData);
}
@ -1362,7 +1362,7 @@ public class NotificationsFragment extends SFragment implements
NotificationViewData.Concrete newViewData = new NotificationViewData.Concrete(
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);
updateAdapter();

View File

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

View File

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

View File

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