mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Change spinner to lazily read database stuff.
Otherwise you get into situations where Spinner will force DB accesses super early during Application#onCreate on the main thread, which can be bad when testing large DB migrations.
This commit is contained in:
committed by
Cody Henthorne
parent
3ce5a7da67
commit
10f78d5daa
@@ -20,10 +20,10 @@ class MainActivity : AppCompatActivity() {
|
||||
Spinner.init(
|
||||
application,
|
||||
mapOf(
|
||||
"Name" to "${Build.MODEL} (API ${Build.VERSION.SDK_INT})",
|
||||
"Package" to packageName
|
||||
"Name" to { "${Build.MODEL} (API ${Build.VERSION.SDK_INT})" },
|
||||
"Package" to { packageName }
|
||||
),
|
||||
mapOf("main" to Spinner.DatabaseConfig(db = db)),
|
||||
mapOf("main" to Spinner.DatabaseConfig(db = { db })),
|
||||
emptyMap()
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user