chore: update nostr sdk
This commit is contained in:
@@ -24,7 +24,7 @@ kotlin {
|
||||
implementation(libs.jetbrains.navigation3.ui)
|
||||
implementation(libs.jetbrains.lifecycle.viewmodelNavigation3)
|
||||
implementation(libs.androidx.core.splashscreen)
|
||||
implementation("su.reya:nostr-sdk-kmp:0.2.3")
|
||||
implementation("su.reya:nostr-sdk-kmp:0.2.6")
|
||||
implementation("io.coil-kt.coil3:coil-compose:3.4.0")
|
||||
implementation("io.coil-kt.coil3:coil-network-okhttp:3.4.0")
|
||||
implementation("io.github.kalinjul.easyqrscan:scanner:0.7.0")
|
||||
|
||||
@@ -52,13 +52,17 @@ class NostrForegroundService : Service() {
|
||||
notificationJob = serviceScope.launch {
|
||||
try {
|
||||
Log.d("Coop", "Starting Nostr in background")
|
||||
|
||||
|
||||
// Create a database directory
|
||||
val dbDir = File(filesDir, "nostr")
|
||||
dbDir.mkdirs()
|
||||
|
||||
// Initialize Nostr client
|
||||
nostr.init(dbDir.absolutePath)
|
||||
try {
|
||||
nostr.init(dbDir.absolutePath)
|
||||
} catch (e: Exception) {
|
||||
throw IllegalStateException("Failed to initialize Nostr Client", e)
|
||||
}
|
||||
// Connect to bootstrap relays
|
||||
nostr.connectBootstrapRelays()
|
||||
// Handle notifications
|
||||
|
||||
Reference in New Issue
Block a user