Fixes the crash on starting when the contentResolver is not ready yet.

This commit is contained in:
Vitor Pamplona
2025-09-08 15:50:07 -04:00
parent ac2609b4f6
commit 4c8456c4af
2 changed files with 3 additions and 3 deletions

View File

@@ -161,7 +161,7 @@ class Amethyst : Application() {
AccountCacheState(
geolocationFlow = locationManager.geohashStateFlow,
nwcFilterAssembler = sources.nwc,
contentResolver = contentResolver,
contentResolverFn = ::contentResolverFn,
cache = cache,
client = client,
)

View File

@@ -44,7 +44,7 @@ import kotlinx.coroutines.flow.StateFlow
class AccountCacheState(
val geolocationFlow: StateFlow<LocationState.LocationResult>,
val nwcFilterAssembler: NWCPaymentFilterAssembler,
val contentResolver: ContentResolver,
val contentResolverFn: () -> ContentResolver,
val cache: LocalCache,
val client: INostrClient,
) {
@@ -75,7 +75,7 @@ class AccountCacheState(
NostrSignerExternal(
pubKey = accountSettings.keyPair.pubKey.toHexKey(),
packageName = packageName,
contentResolver = contentResolver,
contentResolver = contentResolverFn(),
)
}
},