Browse Source

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

tags/v1.0
Alibek Omarov 5 months ago
parent
commit
ad894756bc
12 changed files with 10 additions and 28 deletions
  1. +1
    -1
      app/build.gradle
  2. +0
    -2
      app/src/main/java/com/keylesspalace/tusky/adapter/MutedStatusViewHolder.java
  3. +1
    -2
      app/src/main/java/com/keylesspalace/tusky/adapter/PollAdapter.kt
  4. +1
    -1
      app/src/main/java/com/keylesspalace/tusky/components/search/fragments/SearchStatusesFragment.kt
  5. +1
    -0
      app/src/main/java/com/keylesspalace/tusky/db/Converters.kt
  6. +0
    -6
      app/src/main/java/com/keylesspalace/tusky/di/AppModule.kt
  7. +0
    -8
      app/src/main/java/com/keylesspalace/tusky/entity/Account.kt
  8. +2
    -4
      app/src/main/java/com/keylesspalace/tusky/entity/Emoji.kt
  9. +2
    -2
      app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java
  10. +0
    -1
      app/src/main/java/com/keylesspalace/tusky/viewdata/PollViewData.kt
  11. +1
    -1
      build.gradle
  12. +1
    -0
      gradle.properties

+ 1
- 1
app/build.gradle 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


+ 0
- 2
app/src/main/java/com/keylesspalace/tusky/adapter/MutedStatusViewHolder.java 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;


+ 1
- 2
app/src/main/java/com/keylesspalace/tusky/adapter/PollAdapter.kt 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)

}
}

+ 1
- 1
app/src/main/java/com/keylesspalace/tusky/components/search/fragments/SearchStatusesFragment.kt 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
}


+ 1
- 0
app/src/main/java/com/keylesspalace/tusky/db/Converters.kt 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.*


+ 0
- 6
app/src/main/java/com/keylesspalace/tusky/di/AppModule.kt View File

@@ -81,10 +81,4 @@ class AppModule {
AppDatabase.MIGRATION_22_23, AppDatabase.MIGRATION_23_24)
.build()
}

@Provides
@Singleton
fun providesHtmlConverter(): HtmlConverter {
return HtmlConverterImpl()
}
}

+ 0
- 8
app/src/main/java/com/keylesspalace/tusky/entity/Account.kt 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))
}
}

+ 2
- 4
app/src/main/java/com/keylesspalace/tusky/entity/Emoji.kt 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
)

+ 2
- 2
app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java 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();


+ 0
- 1
app/src/main/java/com/keylesspalace/tusky/viewdata/PollViewData.kt 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



+ 1
- 1
build.gradle View File

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


+ 1
- 0
gradle.properties View File

@@ -17,3 +17,4 @@ org.gradle.parallel=true

android.enableR8.fullMode=true
android.useAndroidX=true
kapt.incremental.apt=false

Loading…
Cancel
Save