Skip to content

Commit

Permalink
Refactors the lambda used for content resolvers.
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorpamplona committed Jul 30, 2024
1 parent f823649 commit b29ccd9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions amethyst/src/main/java/com/vitorpamplona/amethyst/Amethyst.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -78,6 +79,8 @@ class Amethyst : Application() {
.build()
}

fun contentResolverFn(): ContentResolver = contentResolver

override fun onCreate() {
super.onCreate()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ fun LoggedInPage(
)
}
},
contentResolver = { Amethyst.instance.contentResolver },
contentResolver = Amethyst.instance::contentResolverFn,
)
}
}
Expand All @@ -196,7 +196,7 @@ fun LoggedInPage(
)
}
},
contentResolver = { Amethyst.instance.contentResolver },
contentResolver = Amethyst.instance::contentResolverFn,
)
onDispose {
accountViewModel.account.signer.launcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ fun LoginPage(
}
}
},
contentResolver = { Amethyst.instance.contentResolver },
contentResolver = Amethyst.instance::contentResolverFn,
)
onDispose { externalSignerLauncher.clearLauncher() }
}
Expand Down

0 comments on commit b29ccd9

Please sign in to comment.