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

main
Alibek Omarov 5 years ago
parent bf62187fe2
commit 8641b0f220
  1. 2
      app/build.gradle
  2. 2
      app/src/main/java/com/keylesspalace/tusky/adapter/MutedStatusViewHolder.java
  3. 1
      app/src/main/java/com/keylesspalace/tusky/adapter/PollAdapter.kt
  4. 2
      app/src/main/java/com/keylesspalace/tusky/components/search/fragments/SearchStatusesFragment.kt
  5. 1
      app/src/main/java/com/keylesspalace/tusky/db/Converters.kt
  6. 6
      app/src/main/java/com/keylesspalace/tusky/di/AppModule.kt
  7. 8
      app/src/main/java/com/keylesspalace/tusky/entity/Account.kt
  8. 6
      app/src/main/java/com/keylesspalace/tusky/entity/Emoji.kt
  9. 4
      app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java
  10. 1
      app/src/main/java/com/keylesspalace/tusky/viewdata/PollViewData.kt
  11. 2
      build.gradle
  12. 1
      gradle.properties

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

@ -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;

@ -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

@ -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
}

@ -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.*

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

@ -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))
}
}

@ -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
)

@ -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();

@ -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

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

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

Loading…
Cancel
Save