diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/Amethyst.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/Amethyst.kt index cd9c03ea7..dbfad5218 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/Amethyst.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/Amethyst.kt @@ -21,6 +21,7 @@ package com.vitorpamplona.amethyst import android.app.Application +import android.content.ContentResolver import android.content.Context import android.os.Looper import android.os.StrictMode @@ -78,6 +79,8 @@ class Amethyst : Application() { .build() } + fun contentResolverFn(): ContentResolver = contentResolver + override fun onCreate() { super.onCreate() diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/AccountScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/AccountScreen.kt index 0d1aa111b..7750b476d 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/AccountScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/AccountScreen.kt @@ -176,7 +176,7 @@ fun LoggedInPage( ) } }, - contentResolver = { Amethyst.instance.contentResolver }, + contentResolver = Amethyst.instance::contentResolverFn, ) } } @@ -196,7 +196,7 @@ fun LoggedInPage( ) } }, - contentResolver = { Amethyst.instance.contentResolver }, + contentResolver = Amethyst.instance::contentResolverFn, ) onDispose { accountViewModel.account.signer.launcher diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedOff/LoginScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedOff/LoginScreen.kt index ad9e64492..def057141 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedOff/LoginScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedOff/LoginScreen.kt @@ -198,7 +198,7 @@ fun LoginPage( } } }, - contentResolver = { Amethyst.instance.contentResolver }, + contentResolver = Amethyst.instance::contentResolverFn, ) onDispose { externalSignerLauncher.clearLauncher() } }