Sync with upstream
This commit is contained in:
@@ -175,8 +175,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
sourceCompatibility JavaVersion.VERSION_21
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
targetCompatibility JavaVersion.VERSION_21
|
||||||
}
|
}
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
@@ -212,7 +212,7 @@ configurations.all {
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.JVM_17
|
jvmTarget = JvmTarget.JVM_21
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -39,7 +39,7 @@ class AccountNotificationsEoseFromInboxRelaysManager(
|
|||||||
client: NostrClient,
|
client: NostrClient,
|
||||||
allKeys: () -> Set<AccountQueryState>,
|
allKeys: () -> Set<AccountQueryState>,
|
||||||
) : PerUserEoseManager<AccountQueryState>(client, allKeys) {
|
) : PerUserEoseManager<AccountQueryState>(client, allKeys) {
|
||||||
override fun user(query: AccountQueryState) = query.account.userProfile()
|
override fun user(key: AccountQueryState) = key.account.userProfile()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Downloads most notifications from the user's own inbox relays.
|
* Downloads most notifications from the user's own inbox relays.
|
||||||
@@ -59,7 +59,7 @@ class AccountNotificationsEoseFromInboxRelaysManager(
|
|||||||
filterNotificationsToPubkey(
|
filterNotificationsToPubkey(
|
||||||
relay = it,
|
relay = it,
|
||||||
pubkey = user(key).pubkeyHex,
|
pubkey = user(key).pubkeyHex,
|
||||||
since = since?.get(it)?.time ?: key.feedContentStates.notifications.lastNoteCreatedAtIfFilled(),
|
since = since?.get(it)?.time ?: key.feedContentStates.notifications.lastNoteCreatedAtIfFilled() ?: TimeUtils.oneWeekAgo(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -39,7 +39,7 @@ class AccountNotificationsEoseFromRandomRelaysManager(
|
|||||||
client: NostrClient,
|
client: NostrClient,
|
||||||
allKeys: () -> Set<AccountQueryState>,
|
allKeys: () -> Set<AccountQueryState>,
|
||||||
) : PerUserEoseManager<AccountQueryState>(client, allKeys) {
|
) : PerUserEoseManager<AccountQueryState>(client, allKeys) {
|
||||||
override fun user(query: AccountQueryState) = query.account.userProfile()
|
override fun user(key: AccountQueryState) = key.account.userProfile()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Downloads most notifications from the user's own inbox relays.
|
* Downloads most notifications from the user's own inbox relays.
|
||||||
@@ -51,7 +51,7 @@ class AccountNotificationsEoseFromRandomRelaysManager(
|
|||||||
since: SincePerRelayMap?,
|
since: SincePerRelayMap?,
|
||||||
): List<RelayBasedFilter>? =
|
): List<RelayBasedFilter>? =
|
||||||
(key.account.followsPerRelay.value.keys - key.account.notificationRelays.flow.value).flatMap {
|
(key.account.followsPerRelay.value.keys - key.account.notificationRelays.flow.value).flatMap {
|
||||||
val since = since?.get(it)?.time ?: TimeUtils.oneDayAgo()
|
val since = since?.get(it)?.time ?: TimeUtils.oneWeekAgo()
|
||||||
filterJustTheLatestNotificationsToPubkeyFromRandomRelays(it, user(key).pubkeyHex, since)
|
filterJustTheLatestNotificationsToPubkeyFromRandomRelays(it, user(key).pubkeyHex, since)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -116,7 +116,7 @@ fun filterNotificationsToPubkey(
|
|||||||
Filter(
|
Filter(
|
||||||
kinds = NotificationsPerKeyKinds,
|
kinds = NotificationsPerKeyKinds,
|
||||||
tags = mapOf("p" to listOf(pubkey)),
|
tags = mapOf("p" to listOf(pubkey)),
|
||||||
limit = 50,
|
limit = 500,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -126,7 +126,7 @@ fun filterNotificationsToPubkey(
|
|||||||
Filter(
|
Filter(
|
||||||
kinds = NotificationsPerKeyKinds2,
|
kinds = NotificationsPerKeyKinds2,
|
||||||
tags = mapOf("p" to listOf(pubkey)),
|
tags = mapOf("p" to listOf(pubkey)),
|
||||||
limit = 100,
|
limit = 500,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -147,7 +147,7 @@ fun filterJustTheLatestNotificationsToPubkeyFromRandomRelays(
|
|||||||
Filter(
|
Filter(
|
||||||
kinds = SummaryKinds,
|
kinds = SummaryKinds,
|
||||||
tags = mapOf("p" to listOf(pubkey)),
|
tags = mapOf("p" to listOf(pubkey)),
|
||||||
limit = 10,
|
limit = 500,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -157,7 +157,7 @@ fun filterJustTheLatestNotificationsToPubkeyFromRandomRelays(
|
|||||||
Filter(
|
Filter(
|
||||||
kinds = NotificationsPerKeyKinds,
|
kinds = NotificationsPerKeyKinds,
|
||||||
tags = mapOf("p" to listOf(pubkey)),
|
tags = mapOf("p" to listOf(pubkey)),
|
||||||
limit = 5,
|
limit = 500,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -167,7 +167,7 @@ fun filterJustTheLatestNotificationsToPubkeyFromRandomRelays(
|
|||||||
Filter(
|
Filter(
|
||||||
kinds = NotificationsPerKeyKinds2,
|
kinds = NotificationsPerKeyKinds2,
|
||||||
tags = mapOf("p" to listOf(pubkey)),
|
tags = mapOf("p" to listOf(pubkey)),
|
||||||
limit = 5,
|
limit = 500,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
+4
@@ -76,6 +76,10 @@ fun filterMissingAddressables(keys: List<EventFinderQueryState>): List<RelayBase
|
|||||||
potentialRelaysToFindAddress(key.note).ifEmpty { default }.forEach { relayUrl ->
|
potentialRelaysToFindAddress(key.note).ifEmpty { default }.forEach { relayUrl ->
|
||||||
add(relayUrl, key.note.address)
|
add(relayUrl, key.note.address)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
key.account.searchRelayList.flow.value.forEach { relayUrl ->
|
||||||
|
add(relayUrl, key.note.address)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// loads threading that is event-based
|
// loads threading that is event-based
|
||||||
|
|||||||
+4
@@ -77,6 +77,10 @@ fun filterMissingEvents(keys: List<EventFinderQueryState>): List<RelayBasedFilte
|
|||||||
potentialRelaysToFindEvent(key.note).ifEmpty { default }.forEach { relayUrl ->
|
potentialRelaysToFindEvent(key.note).ifEmpty { default }.forEach { relayUrl ->
|
||||||
add(relayUrl, key.note.idHex)
|
add(relayUrl, key.note.idHex)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
key.account.searchRelayList.flow.value.forEach { relayUrl ->
|
||||||
|
add(relayUrl, key.note.idHex)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// loads threading that is event-based
|
// loads threading that is event-based
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ package com.vitorpamplona.amethyst.ui.dal
|
|||||||
import com.vitorpamplona.amethyst.logTime
|
import com.vitorpamplona.amethyst.logTime
|
||||||
|
|
||||||
abstract class AdditiveFeedFilter<T> : FeedFilter<T>() {
|
abstract class AdditiveFeedFilter<T> : FeedFilter<T>() {
|
||||||
abstract fun applyFilter(collection: Set<T>): Set<T>
|
abstract fun applyFilter(newItems: Set<T>): Set<T>
|
||||||
|
|
||||||
abstract fun sort(collection: Set<T>): List<T>
|
abstract fun sort(items: Set<T>): List<T>
|
||||||
|
|
||||||
open fun updateListWith(
|
open fun updateListWith(
|
||||||
oldList: List<T>,
|
oldList: List<T>,
|
||||||
|
|||||||
+3
-3
@@ -42,11 +42,11 @@ class ChatroomFeedFilter(
|
|||||||
.reversed()
|
.reversed()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> {
|
override fun applyFilter(newItems: Set<Note>): Set<Note> {
|
||||||
val chatroom = account.chatroomList.getOrCreatePrivateChatroom(withUser)
|
val chatroom = account.chatroomList.getOrCreatePrivateChatroom(withUser)
|
||||||
|
|
||||||
return collection.filter { it in chatroom.messages && account.isAcceptable(it) }.toSet()
|
return newItems.filter { it in chatroom.messages && account.isAcceptable(it) }.toSet()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -40,10 +40,10 @@ class ChannelFeedFilter(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> =
|
override fun applyFilter(newItems: Set<Note>): Set<Note> =
|
||||||
collection
|
newItems
|
||||||
.filter { channel.notes.containsKey(it.idHex) && account.isAcceptable(it) }
|
.filter { channel.notes.containsKey(it.idHex) && account.isAcceptable(it) }
|
||||||
.toSet()
|
.toSet()
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -254,5 +254,5 @@ class ChatroomListKnownFeedFilter(
|
|||||||
return newRelevantPrivateMessages
|
return newRelevantPrivateMessages
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -133,5 +133,5 @@ class ChatroomListNewFeedFilter(
|
|||||||
return newRelevantPrivateMessages
|
return newRelevantPrivateMessages
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -46,7 +46,7 @@ class CommunityFeedFilter(
|
|||||||
return sort(result)
|
return sort(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> {
|
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> {
|
||||||
val myPubKey = account.userProfile().pubkeyHex
|
val myPubKey = account.userProfile().pubkeyHex
|
||||||
@@ -79,5 +79,5 @@ class CommunityFeedFilter(
|
|||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -55,7 +55,7 @@ open class DiscoverLongFormFeedFilter(
|
|||||||
return sort(notes)
|
return sort(notes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
fun buildFilterParams(account: Account): FilterByListParams =
|
fun buildFilterParams(account: Account): FilterByListParams =
|
||||||
FilterByListParams.create(
|
FilterByListParams.create(
|
||||||
@@ -72,5 +72,5 @@ open class DiscoverLongFormFeedFilter(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -61,7 +61,7 @@ open class DiscoverChatFeedFilter(
|
|||||||
return sort(allChannelNotes)
|
return sort(allChannelNotes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
fun buildFilterParams(account: Account): FilterByListParams =
|
fun buildFilterParams(account: Account): FilterByListParams =
|
||||||
FilterByListParams.create(
|
FilterByListParams.create(
|
||||||
@@ -102,13 +102,13 @@ open class DiscoverChatFeedFilter(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> {
|
override fun sort(items: Set<Note>): List<Note> {
|
||||||
val lastNote =
|
val lastNote =
|
||||||
collection.associateWith { note ->
|
items.associateWith { note ->
|
||||||
LocalCache.getPublicChatChannelIfExists(note.idHex)?.lastNote?.createdAt() ?: 0
|
LocalCache.getPublicChatChannelIfExists(note.idHex)?.lastNote?.createdAt() ?: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
return collection
|
return items
|
||||||
.sortedWith(
|
.sortedWith(
|
||||||
compareBy(
|
compareBy(
|
||||||
{ lastNote[it] },
|
{ lastNote[it] },
|
||||||
|
|||||||
+2
-2
@@ -53,7 +53,7 @@ open class DiscoverFollowSetsFeedFilter(
|
|||||||
return sort(notes)
|
return sort(notes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
fun buildFilterParams(account: Account): FilterByListParams =
|
fun buildFilterParams(account: Account): FilterByListParams =
|
||||||
FilterByListParams.create(
|
FilterByListParams.create(
|
||||||
@@ -70,5 +70,5 @@ open class DiscoverFollowSetsFeedFilter(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -60,7 +60,7 @@ open class DiscoverLiveFeedFilter(
|
|||||||
return sort(notes)
|
return sort(notes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
protected open fun innerApplyFilter(collection: Collection<Note>): Set<Note> {
|
protected open fun innerApplyFilter(collection: Collection<Note>): Set<Note> {
|
||||||
val filterParams =
|
val filterParams =
|
||||||
@@ -75,7 +75,7 @@ open class DiscoverLiveFeedFilter(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> {
|
override fun sort(items: Set<Note>): List<Note> {
|
||||||
val topFilter = account.liveDiscoveryFollowLists.value
|
val topFilter = account.liveDiscoveryFollowLists.value
|
||||||
val discoveryTopFilterAuthors =
|
val discoveryTopFilterAuthors =
|
||||||
when (topFilter) {
|
when (topFilter) {
|
||||||
@@ -94,12 +94,12 @@ open class DiscoverLiveFeedFilter(
|
|||||||
|
|
||||||
val counter = ParticipantListBuilder()
|
val counter = ParticipantListBuilder()
|
||||||
val participantCounts =
|
val participantCounts =
|
||||||
collection.associate { it to counter.countFollowsThatParticipateOn(it, followingKeySet) }
|
items.associate { it to counter.countFollowsThatParticipateOn(it, followingKeySet) }
|
||||||
|
|
||||||
val allParticipants =
|
val allParticipants =
|
||||||
collection.associate { it to counter.countFollowsThatParticipateOn(it, null) }
|
items.associate { it to counter.countFollowsThatParticipateOn(it, null) }
|
||||||
|
|
||||||
return collection
|
return items
|
||||||
.sortedWith(
|
.sortedWith(
|
||||||
compareBy(
|
compareBy(
|
||||||
{ convertStatusToOrder((it.event as? LiveActivitiesEvent)?.status()) },
|
{ convertStatusToOrder((it.event as? LiveActivitiesEvent)?.status()) },
|
||||||
|
|||||||
+4
-4
@@ -69,7 +69,7 @@ open class DiscoverCommunityFeedFilter(
|
|||||||
return sort(notes)
|
return sort(notes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
protected open fun innerApplyFilter(collection: Collection<Note>): Set<Note> {
|
protected open fun innerApplyFilter(collection: Collection<Note>): Set<Note> {
|
||||||
// here, we need to look for CommunityDefinition in new collection AND new CommunityDefinition from Post Approvals
|
// here, we need to look for CommunityDefinition in new collection AND new CommunityDefinition from Post Approvals
|
||||||
@@ -111,13 +111,13 @@ open class DiscoverCommunityFeedFilter(
|
|||||||
comingFrom: List<NormalizedRelayUrl> = emptyList(),
|
comingFrom: List<NormalizedRelayUrl> = emptyList(),
|
||||||
) = aTag != null && aTag.kind == CommunityDefinitionEvent.KIND && params.match(aTag, comingFrom)
|
) = aTag != null && aTag.kind == CommunityDefinitionEvent.KIND && params.match(aTag, comingFrom)
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> {
|
override fun sort(items: Set<Note>): List<Note> {
|
||||||
val lastNote =
|
val lastNote =
|
||||||
collection.associateWith { note ->
|
items.associateWith { note ->
|
||||||
note.boosts.maxOfOrNull { it.createdAt() ?: 0 } ?: 0
|
note.boosts.maxOfOrNull { it.createdAt() ?: 0 } ?: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
return collection
|
return items
|
||||||
.sortedWith(
|
.sortedWith(
|
||||||
compareBy(
|
compareBy(
|
||||||
{ lastNote[it] },
|
{ lastNote[it] },
|
||||||
|
|||||||
+2
-2
@@ -55,7 +55,7 @@ open class DiscoverNIP89FeedFilter(
|
|||||||
return sort(notes)
|
return sort(notes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
fun buildFilterParams(account: Account): FilterByListParams =
|
fun buildFilterParams(account: Account): FilterByListParams =
|
||||||
FilterByListParams.create(
|
FilterByListParams.create(
|
||||||
@@ -85,5 +85,5 @@ open class DiscoverNIP89FeedFilter(
|
|||||||
acceptDVM(it)
|
acceptDVM(it)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(compareBy({ it.createdAt() }, { it.idHex })).reversed()
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(compareBy({ it.createdAt() }, { it.idHex })).reversed()
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -54,7 +54,7 @@ open class DiscoverMarketplaceFeedFilter(
|
|||||||
return sort(notes)
|
return sort(notes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
fun buildFilterParams(account: Account): FilterByListParams =
|
fun buildFilterParams(account: Account): FilterByListParams =
|
||||||
FilterByListParams.create(
|
FilterByListParams.create(
|
||||||
@@ -71,5 +71,5 @@ open class DiscoverMarketplaceFeedFilter(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(compareBy({ it.createdAt() }, { it.idHex })).reversed()
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(compareBy({ it.createdAt() }, { it.idHex })).reversed()
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -32,8 +32,8 @@ class DraftEventsFeedFilter(
|
|||||||
) : AdditiveFeedFilter<Note>() {
|
) : AdditiveFeedFilter<Note>() {
|
||||||
override fun feedKey(): String = account.userProfile().pubkeyHex
|
override fun feedKey(): String = account.userProfile().pubkeyHex
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> =
|
override fun applyFilter(newItems: Set<Note>): Set<Note> =
|
||||||
collection.filterTo(HashSet()) {
|
newItems.filterTo(HashSet()) {
|
||||||
acceptableEvent(it)
|
acceptableEvent(it)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,5 +51,5 @@ class DraftEventsFeedFilter(
|
|||||||
return noteEvent is DraftEvent && noteEvent.pubKey == account.userProfile().pubkeyHex
|
return noteEvent is DraftEvent && noteEvent.pubKey == account.userProfile().pubkeyHex
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -69,7 +69,7 @@ open class NIP90ContentDiscoveryResponseFilter(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
fun buildFilterParams(account: Account): FilterByListParams =
|
fun buildFilterParams(account: Account): FilterByListParams =
|
||||||
FilterByListParams.create(
|
FilterByListParams.create(
|
||||||
@@ -95,7 +95,7 @@ open class NIP90ContentDiscoveryResponseFilter(
|
|||||||
}.toSet()
|
}.toSet()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> {
|
override fun sort(items: Set<Note>): List<Note> {
|
||||||
return collection.toList() // collection.sortedWith(compareBy({ it.createdAt() }, { it.idHex })).reversed()
|
return items.toList() // collection.sortedWith(compareBy({ it.createdAt() }, { it.idHex })).reversed()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -55,7 +55,7 @@ class GeoHashFeedFilter(
|
|||||||
return sort(notes)
|
return sort(notes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> = collection.filterTo(HashSet<Note>()) { acceptableEvent(it, tag) }
|
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> = collection.filterTo(HashSet<Note>()) { acceptableEvent(it, tag) }
|
||||||
|
|
||||||
@@ -87,5 +87,5 @@ class GeoHashFeedFilter(
|
|||||||
geohash: String,
|
geohash: String,
|
||||||
): Boolean = event is CommentEvent && event.isTaggedScope(geohash, GeohashId::match)
|
): Boolean = event is CommentEvent && event.isTaggedScope(geohash, GeohashId::match)
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -57,7 +57,7 @@ class HashtagFeedFilter(
|
|||||||
return sort(notes)
|
return sort(notes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> = collection.filterTo(HashSet<Note>()) { acceptableEvent(it, tag) }
|
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> = collection.filterTo(HashSet<Note>()) { acceptableEvent(it, tag) }
|
||||||
|
|
||||||
@@ -91,5 +91,5 @@ class HashtagFeedFilter(
|
|||||||
hashTag: String,
|
hashTag: String,
|
||||||
): Boolean = event is CommentEvent && event.isTaggedScope(hashTag, HashtagId::match)
|
): Boolean = event is CommentEvent && event.isTaggedScope(hashTag, HashtagId::match)
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -55,7 +55,7 @@ class HomeConversationsFeedFilter(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
fun buildFilterParams(account: Account): FilterByListParams =
|
fun buildFilterParams(account: Account): FilterByListParams =
|
||||||
FilterByListParams.create(
|
FilterByListParams.create(
|
||||||
@@ -90,5 +90,5 @@ class HomeConversationsFeedFilter(
|
|||||||
filterParams: FilterByListParams,
|
filterParams: FilterByListParams,
|
||||||
): Boolean = acceptableEvent(note.event, filterParams) && !note.isNewThread()
|
): Boolean = acceptableEvent(note.event, filterParams) && !note.isNewThread()
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -75,7 +75,7 @@ class HomeNewThreadFeedFilter(
|
|||||||
return sort(notes + longFormNotes)
|
return sort(notes + longFormNotes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> {
|
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> {
|
||||||
val filterParams = buildFilterParams(account)
|
val filterParams = buildFilterParams(account)
|
||||||
@@ -110,8 +110,8 @@ class HomeNewThreadFeedFilter(
|
|||||||
it.isNewThread()
|
it.isNewThread()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> =
|
override fun sort(items: Set<Note>): List<Note> =
|
||||||
collection
|
items
|
||||||
.distinctBy {
|
.distinctBy {
|
||||||
if (it.event is RepostEvent || it.event is GenericRepostEvent) {
|
if (it.event is RepostEvent || it.event is GenericRepostEvent) {
|
||||||
it.replyTo?.lastOrNull()?.idHex ?: it.idHex // only the most recent repost per feed.
|
it.replyTo?.lastOrNull()?.idHex ?: it.idHex // only the most recent repost per feed.
|
||||||
|
|||||||
+6
-10
@@ -111,12 +111,10 @@ class NotificationSummaryState(
|
|||||||
takenIntoAccount.add(noteEvent.id)
|
takenIntoAccount.add(noteEvent.id)
|
||||||
}
|
}
|
||||||
} else if (noteEvent is LnZapEvent) {
|
} else if (noteEvent is LnZapEvent) {
|
||||||
if (
|
// the user might be sending his own receipts noteEvent.pubKey != currentUser
|
||||||
noteEvent.isTaggedUser(currentUser)
|
if (noteEvent.isTaggedUser(currentUser)) {
|
||||||
) { // the user might be sending his own receipts noteEvent.pubKey != currentUser
|
|
||||||
val netDate = formatDate(noteEvent.createdAt)
|
val netDate = formatDate(noteEvent.createdAt)
|
||||||
zaps[netDate] =
|
zaps[netDate] = (zaps[netDate] ?: BigDecimal.ZERO) + (noteEvent.amount ?: BigDecimal.ZERO)
|
||||||
(zaps[netDate] ?: BigDecimal.ZERO) + (noteEvent.amount ?: BigDecimal.ZERO)
|
|
||||||
takenIntoAccount.add(noteEvent.id)
|
takenIntoAccount.add(noteEvent.id)
|
||||||
}
|
}
|
||||||
} else if (noteEvent is BaseThreadedEvent) {
|
} else if (noteEvent is BaseThreadedEvent) {
|
||||||
@@ -178,12 +176,10 @@ class NotificationSummaryState(
|
|||||||
hasNewElements = true
|
hasNewElements = true
|
||||||
}
|
}
|
||||||
} else if (noteEvent is LnZapEvent) {
|
} else if (noteEvent is LnZapEvent) {
|
||||||
if (
|
if (noteEvent.isTaggedUser(currentUser)) {
|
||||||
noteEvent.isTaggedUser(currentUser)
|
// && noteEvent.pubKey != currentUser User might be sending his own receipts
|
||||||
) { // && noteEvent.pubKey != currentUser User might be sending his own receipts
|
|
||||||
val netDate = formatDate(noteEvent.createdAt)
|
val netDate = formatDate(noteEvent.createdAt)
|
||||||
zaps[netDate] =
|
zaps[netDate] = (zaps[netDate] ?: BigDecimal.ZERO) + (noteEvent.amount ?: BigDecimal.ZERO)
|
||||||
(zaps[netDate] ?: BigDecimal.ZERO) + (noteEvent.amount ?: BigDecimal.ZERO)
|
|
||||||
takenIntoAccount.add(noteEvent.id)
|
takenIntoAccount.add(noteEvent.id)
|
||||||
hasNewElements = true
|
hasNewElements = true
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -84,7 +84,7 @@ class NotificationFeedFilter(
|
|||||||
return sort(notifications)
|
return sort(notifications)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> {
|
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> {
|
||||||
val filterParams = buildFilterParams(account)
|
val filterParams = buildFilterParams(account)
|
||||||
@@ -136,7 +136,7 @@ class NotificationFeedFilter(
|
|||||||
tagsAnEventByUser(it, loggedInUserHex)
|
tagsAnEventByUser(it, loggedInUserHex)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
|
|
||||||
fun tagsAnEventByUser(
|
fun tagsAnEventByUser(
|
||||||
note: Note,
|
note: Note,
|
||||||
|
|||||||
+2
-2
@@ -54,7 +54,7 @@ class UserProfileConversationsFeedFilter(
|
|||||||
return sort(notes + longFormNotes)
|
return sort(notes + longFormNotes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> = collection.filterTo(HashSet()) { acceptableEvent(it) }
|
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> = collection.filterTo(HashSet()) { acceptableEvent(it) }
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ class UserProfileConversationsFeedFilter(
|
|||||||
!it.isNewThread() &&
|
!it.isNewThread() &&
|
||||||
account.isAcceptable(it)
|
account.isAcceptable(it)
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
|
|
||||||
override fun limit() = 200
|
override fun limit() = 200
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -55,7 +55,7 @@ class UserProfileGalleryFeedFilter(
|
|||||||
return sorted.toList()
|
return sorted.toList()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> {
|
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> {
|
||||||
val params = buildFilterParams(account)
|
val params = buildFilterParams(account)
|
||||||
@@ -82,5 +82,5 @@ class UserProfileGalleryFeedFilter(
|
|||||||
hiddenUsers = account.hiddenUsers.flow.value,
|
hiddenUsers = account.hiddenUsers.flow.value,
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -41,7 +41,7 @@ class UserProfileAppRecommendationsFeedFilter(
|
|||||||
return sort(recommendations)
|
return sort(recommendations)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> = collection.mapNotNull { filterMap(it) }.flatten().toSet()
|
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> = collection.mapNotNull { filterMap(it) }.flatten().toSet()
|
||||||
|
|
||||||
@@ -56,5 +56,5 @@ class UserProfileAppRecommendationsFeedFilter(
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -62,7 +62,7 @@ class UserProfileMutualFeedFilter(
|
|||||||
return sort(notes + longFormNotes)
|
return sort(notes + longFormNotes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> = collection.filterTo(HashSet()) { acceptableEvent(it) }
|
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> = collection.filterTo(HashSet()) { acceptableEvent(it) }
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ class UserProfileMutualFeedFilter(
|
|||||||
) &&
|
) &&
|
||||||
it.event?.isTaggedUser(user.pubkeyHex) == true
|
it.event?.isTaggedUser(user.pubkeyHex) == true
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
|
|
||||||
override fun limit() = 200
|
override fun limit() = 200
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -62,7 +62,7 @@ class UserProfileNewThreadFeedFilter(
|
|||||||
return sort(notes + longFormNotes)
|
return sort(notes + longFormNotes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> = collection.filterTo(HashSet()) { acceptableEvent(it) }
|
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> = collection.filterTo(HashSet()) { acceptableEvent(it) }
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ class UserProfileNewThreadFeedFilter(
|
|||||||
it.isNewThread() &&
|
it.isNewThread() &&
|
||||||
account.isAcceptable(it)
|
account.isAcceptable(it)
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
|
|
||||||
override fun limit() = 200
|
override fun limit() = 200
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -34,14 +34,14 @@ class UserProfileReportsFeedFilter(
|
|||||||
|
|
||||||
override fun feed(): List<Note> = sort(innerApplyFilter(user.reports.values.flatten()))
|
override fun feed(): List<Note> = sort(innerApplyFilter(user.reports.values.flatten()))
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> =
|
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> =
|
||||||
collection
|
collection
|
||||||
.filter { it.event is ReportEvent && it.event?.isTaggedUser(user.pubkeyHex) == true }
|
.filter { it.event is ReportEvent && it.event?.isTaggedUser(user.pubkeyHex) == true }
|
||||||
.toSet()
|
.toSet()
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
|
|
||||||
override fun limit() = 400
|
override fun limit() = 400
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -72,7 +72,7 @@ class VideoFeedFilter(
|
|||||||
return sort(notes)
|
return sort(notes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyFilter(collection: Set<Note>): Set<Note> = innerApplyFilter(collection)
|
override fun applyFilter(newItems: Set<Note>): Set<Note> = innerApplyFilter(newItems)
|
||||||
|
|
||||||
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> {
|
private fun innerApplyFilter(collection: Collection<Note>): Set<Note> {
|
||||||
val params = buildFilterParams(account)
|
val params = buildFilterParams(account)
|
||||||
@@ -124,5 +124,5 @@ class VideoFeedFilter(
|
|||||||
hiddenUsers = account.hiddenUsers.flow.value,
|
hiddenUsers = account.hiddenUsers.flow.value,
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun sort(collection: Set<Note>): List<Note> = collection.sortedWith(DefaultFeedOrder)
|
override fun sort(items: Set<Note>): List<Note> = items.sortedWith(DefaultFeedOrder)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
sourceCompatibility JavaVersion.VERSION_21
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
targetCompatibility JavaVersion.VERSION_21
|
||||||
}
|
}
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
resources {
|
resources {
|
||||||
@@ -44,7 +44,7 @@ android {
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.JVM_17
|
jvmTarget = JvmTarget.JVM_21
|
||||||
freeCompilerArgs.add("-Xstring-concat=inline")
|
freeCompilerArgs.add("-Xstring-concat=inline")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
sourceCompatibility JavaVersion.VERSION_21
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
targetCompatibility JavaVersion.VERSION_21
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets.androidTest.assets.srcDirs += ["../quartz/src/androidTest/assets"]
|
sourceSets.androidTest.assets.srcDirs += ["../quartz/src/androidTest/assets"]
|
||||||
@@ -48,7 +48,7 @@ android {
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.JVM_17
|
jvmTarget = JvmTarget.JVM_21
|
||||||
freeCompilerArgs.add("-Xstring-concat=inline")
|
freeCompilerArgs.add("-Xstring-concat=inline")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
sourceCompatibility JavaVersion.VERSION_21
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
targetCompatibility JavaVersion.VERSION_21
|
||||||
}
|
}
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
@@ -40,7 +40,7 @@ android {
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.JVM_17
|
jvmTarget = JvmTarget.JVM_21
|
||||||
freeCompilerArgs.add("-Xstring-concat=inline")
|
freeCompilerArgs.add("-Xstring-concat=inline")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -28,8 +28,8 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
sourceCompatibility JavaVersion.VERSION_21
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
targetCompatibility JavaVersion.VERSION_21
|
||||||
}
|
}
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
resources {
|
resources {
|
||||||
@@ -40,7 +40,7 @@ android {
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.JVM_17
|
jvmTarget = JvmTarget.JVM_21
|
||||||
freeCompilerArgs.add("-Xstring-concat=inline")
|
freeCompilerArgs.add("-Xstring-concat=inline")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user