From 16e9d43da8d601d0f8bf1818fb0b0c4f8abddbfb Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 28 Aug 2025 11:17:49 -0400 Subject: [PATCH 1/2] Removes DB migration --- .../vitorpamplona/amethyst/model/Account.kt | 80 ------------------- 1 file changed, 80 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Account.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Account.kt index 33b3b8532..2737a74b9 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Account.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/model/Account.kt @@ -128,9 +128,6 @@ import com.vitorpamplona.quartz.nip01Core.relay.filters.Filter import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl import com.vitorpamplona.quartz.nip01Core.signers.EventTemplate import com.vitorpamplona.quartz.nip01Core.signers.NostrSigner -import com.vitorpamplona.quartz.nip01Core.tags.addressables.taggedAddresses -import com.vitorpamplona.quartz.nip01Core.tags.events.taggedEventIds -import com.vitorpamplona.quartz.nip01Core.tags.geohash.geohashes import com.vitorpamplona.quartz.nip01Core.tags.hashtags.hashtags import com.vitorpamplona.quartz.nip01Core.tags.people.hasAnyTaggedUser import com.vitorpamplona.quartz.nip01Core.tags.people.taggedUserIds @@ -1789,82 +1786,5 @@ class Account( } } } - - scope.launch(Dispatchers.Default) { - Log.d("DB UPGRADE", "Migrating List") - delay(1000 * 60 * 1) - // waits 5 minutes before migrating the list. - val contactList = userProfile().latestContactList - val oldChannels = contactList?.taggedEventIds()?.toSet()?.mapNotNull { cache.getPublicChatChannelIfExists(it) } - - if (oldChannels != null && oldChannels.isNotEmpty()) { - Log.d("DB UPGRADE", "Migrating List with ${oldChannels.size} old channels ") - val existingChannels = publicChatList.flowSet.value - - val needsToUpgrade = oldChannels.filter { it.idHex !in existingChannels } - - Log.d("DB UPGRADE", "Migrating List with ${needsToUpgrade.size} needsToUpgrade ") - - if (needsToUpgrade.isNotEmpty()) { - Log.d("DB UPGRADE", "Migrating List") - runCatching { - sendMyPublicAndPrivateOutbox(publicChatList.follow(oldChannels)) - } - } - } - - val oldCommunities = contactList?.taggedAddresses()?.toSet()?.map { cache.getOrCreateAddressableNote(it) } - - if (oldCommunities != null && oldCommunities.isNotEmpty()) { - Log.d("DB UPGRADE", "Migrating List with ${oldCommunities.size} old communities ") - val existingCommunities = communityList.flowSet.value - - val needsToUpgrade = oldCommunities.filter { it.idHex !in existingCommunities } - - Log.d("DB UPGRADE", "Migrating List with ${needsToUpgrade.size} needsToUpgrade ") - - if (needsToUpgrade.isNotEmpty()) { - Log.d("DB UPGRADE", "Migrating List") - runCatching { - sendMyPublicAndPrivateOutbox(communityList.follow(oldCommunities)) - } - } - } - - val oldHashtags = contactList?.hashtags()?.toSet() - - if (oldHashtags != null && oldHashtags.isNotEmpty()) { - Log.d("DB UPGRADE", "Migrating List with ${oldHashtags.size} old hashtags ") - val existingHashtags = hashtagList.flow.value - - val needsToUpgrade = oldHashtags.filter { it !in existingHashtags } - - Log.d("DB UPGRADE", "Migrating List with ${needsToUpgrade.size} needsToUpgrade ") - - if (needsToUpgrade.isNotEmpty()) { - Log.d("DB UPGRADE", "Migrating List") - runCatching { - sendMyPublicAndPrivateOutbox(hashtagList.follow(oldHashtags.toList())) - } - } - } - - val oldGeohashes = contactList?.geohashes()?.toSet() - if (oldGeohashes != null && oldGeohashes.isNotEmpty()) { - Log.d("DB UPGRADE", "Migrating List with ${oldGeohashes.size} old geohashes ") - val existingGeohashes = geohashList.flow.value - - val needsToUpgrade = oldGeohashes.filter { it !in existingGeohashes } - - Log.d("DB UPGRADE", "Migrating List with ${needsToUpgrade.size} needsToUpgrade ") - - if (needsToUpgrade.isNotEmpty()) { - Log.d("DB UPGRADE", "Migrating List") - runCatching { - sendMyPublicAndPrivateOutbox(geohashList.follow(oldGeohashes.toList())) - } - } - } - } } } From c298147ad9fb2f314d1595da33394e9f5a48e53e Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 28 Aug 2025 11:18:01 -0400 Subject: [PATCH 2/2] updates google services json --- amethyst/google-services.json | 42 +++++------------------------------ gradle/libs.versions.toml | 4 ++-- 2 files changed, 8 insertions(+), 38 deletions(-) diff --git a/amethyst/google-services.json b/amethyst/google-services.json index dbdb975e5..9fff56559 100644 --- a/amethyst/google-services.json +++ b/amethyst/google-services.json @@ -12,12 +12,7 @@ "package_name": "com.vitorpamplona.amethyst" } }, - "oauth_client": [ - { - "client_id": "768341258853-6um8ig59qstvio60gfo60fe5e45lnqqe.apps.googleusercontent.com", - "client_type": 3 - } - ], + "oauth_client": [], "api_key": [ { "current_key": "AIzaSyB7ZxgdpgrN6R223HCFdfv4ulP8Egp7trE" @@ -25,12 +20,7 @@ ], "services": { "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "768341258853-6um8ig59qstvio60gfo60fe5e45lnqqe.apps.googleusercontent.com", - "client_type": 3 - } - ] + "other_platform_oauth_client": [] } } }, @@ -41,12 +31,7 @@ "package_name": "com.vitorpamplona.amethyst.benchmark" } }, - "oauth_client": [ - { - "client_id": "768341258853-6um8ig59qstvio60gfo60fe5e45lnqqe.apps.googleusercontent.com", - "client_type": 3 - } - ], + "oauth_client": [], "api_key": [ { "current_key": "AIzaSyB7ZxgdpgrN6R223HCFdfv4ulP8Egp7trE" @@ -54,12 +39,7 @@ ], "services": { "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "768341258853-6um8ig59qstvio60gfo60fe5e45lnqqe.apps.googleusercontent.com", - "client_type": 3 - } - ] + "other_platform_oauth_client": [] } } }, @@ -70,12 +50,7 @@ "package_name": "com.vitorpamplona.amethyst.debug" } }, - "oauth_client": [ - { - "client_id": "768341258853-6um8ig59qstvio60gfo60fe5e45lnqqe.apps.googleusercontent.com", - "client_type": 3 - } - ], + "oauth_client": [], "api_key": [ { "current_key": "AIzaSyB7ZxgdpgrN6R223HCFdfv4ulP8Egp7trE" @@ -83,12 +58,7 @@ ], "services": { "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "768341258853-6um8ig59qstvio60gfo60fe5e45lnqqe.apps.googleusercontent.com", - "client_type": 3 - } - ] + "other_platform_oauth_client": [] } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index dbd7474fe..9e8587df7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,7 +13,7 @@ benchmark = "1.4.0" benchmarkJunit4 = "1.4.0" biometricKtx = "1.2.0-alpha05" coil = "3.3.0" -composeBom = "2025.08.00" +composeBom = "2025.08.01" coreKtx = "1.17.0" datastore = "1.1.7" espressoCore = "3.7.0" @@ -30,7 +30,7 @@ kotlinxSerialization = "1.9.0" kotlinxSerializationPlugin = "2.2.10" languageId = "17.0.6" lazysodiumAndroid = "5.2.0" -lifecycleRuntimeKtx = "2.9.2" +lifecycleRuntimeKtx = "2.9.3" lightcompressor = "1.3.3" markdown = "e1151c8" media3 = "1.8.0"