Update dependencies

This commit is contained in:
greenart7c3
2025-04-25 05:49:24 -03:00
parent 5b329cea57
commit 88aefedc62
4 changed files with 18 additions and 17 deletions
@@ -28,9 +28,9 @@ import com.greenart7c3.nostrsigner.database.LogEntity
import com.greenart7c3.nostrsigner.relays.AmberRelayStats
import com.vitorpamplona.ammolite.relays.COMMON_FEED_TYPES
import com.vitorpamplona.ammolite.relays.NostrClient
import com.vitorpamplona.ammolite.relays.NostrDataSource
import com.vitorpamplona.ammolite.relays.Relay
import com.vitorpamplona.ammolite.relays.TypedFilter
import com.vitorpamplona.ammolite.relays.datasources.NostrDataSource
import com.vitorpamplona.ammolite.relays.filters.EOSETime
import com.vitorpamplona.ammolite.relays.filters.SincePerRelayFilter
import com.vitorpamplona.quartz.nip01Core.core.Event
@@ -42,7 +42,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.launch
object NotificationDataSource : NostrDataSource(NostrSigner.instance.client, "AccountData") {
object NotificationDataSource : NostrDataSource(NostrSigner.instance.client) {
private val eventNotificationConsumer = EventNotificationConsumer(NostrSigner.instance)
private val scope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
@@ -219,14 +219,10 @@ object NotificationDataSource : NostrDataSource(NostrSigner.instance.client, "Ac
}
private val accountChannel =
requestNewChannel { _, _ ->
requestNewSubscription { _, _ ->
invalidateFilters()
}
override fun updateChannelFilters() {
accountChannel.typedFilters = listOf(createNotificationsFilter())
}
override fun auth(
relay: Relay,
challenge: String,
@@ -240,4 +236,8 @@ object NotificationDataSource : NostrDataSource(NostrSigner.instance.client, "Ac
}
}
}
override fun updateSubscriptions() {
accountChannel.typedFilters = listOf(createNotificationsFilter())
}
}
@@ -1307,7 +1307,7 @@ fun MainScreen(
onPost = {
scope.launch(Dispatchers.IO) {
LocalPreferences.updateProxy(context, true, it)
NotificationDataSource.stopSync()
NotificationDataSource.stop()
NostrSigner.instance.checkForNewRelays()
NotificationDataSource.start()
scope.launch {
@@ -266,7 +266,7 @@ fun SettingsScreen(
text = stringResource(R.string.clear_logs_and_activity),
onClick = {
NostrSigner.instance.applicationIOScope.launch {
NotificationDataSource.stopSync()
NotificationDataSource.stop()
isLoading = true
LocalPreferences.allSavedAccounts(NostrSigner.instance).forEach {
NostrSigner.instance.getDatabase(it.npub).let { database ->
@@ -398,7 +398,7 @@ fun SettingsScreen(
checked = false
scope.launch(Dispatchers.IO) {
LocalPreferences.updateProxy(context, false, proxyPort.value.toInt())
NotificationDataSource.stopSync()
NotificationDataSource.stop()
NostrSigner.instance.checkForNewRelays()
NotificationDataSource.start()
}
+8 -7
View File
@@ -11,24 +11,25 @@ junit = "4.13.2"
junitVersion = "1.2.1"
lifecycle_version = "2.8.7"
material3 = "1.3.2"
mockk = "1.13.17"
mockk = "1.14.0"
nav_version = "2.8.9"
quartz = "e007a02d84"
compose_ui = "1.7.8"
quartz = "d25e89f41d"
compose_ui = "1.8.0"
richtextUi = "077a2cde64"
roomKtx = "2.7.0"
roomKtx = "2.7.1"
securityCryptoKtx = "1.1.0-alpha07"
zxingAndroidEmbedded = "4.3.0"
okhttp = "5.0.0-alpha.14"
kotlin = "2.1.20"
workRuntimeKtx = "2.10.0"
agp = "8.9.1"
workRuntimeKtx = "2.10.1"
agp = "8.9.2"
ktlint = "12.1.2"
ksp = "2.1.20-1.0.32"
coil = "3.1.0"
storage = "2.0.0"
jna = "5.17.0"
adaptiveAndroid = "1.1.0"
materialIconsExtended = "1.7.8"
[libraries]
jna = { module = "net.java.dev.jna:jna", version.ref = "jna" }
@@ -45,7 +46,7 @@ junit = { module = "junit:junit", version.ref = "junit" }
lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "lifecycle_version" }
lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle_version" }
lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycle_version" }
material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "compose_ui" }
material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "materialIconsExtended" }
material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" }
mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "nav_version" }