Moved preloadBankList() to BankingPresenter (so this also works on JavaFx)
This commit is contained in:
parent
7b8b18ca0b
commit
fcd7e6c0ba
|
@ -89,6 +89,11 @@ open class BankingPresenter(
|
|||
threadPool.runAsync {
|
||||
readPersistedAccounts()
|
||||
}
|
||||
|
||||
// preloadBankList asynchronously; on Android it takes approximately 18 seconds till banks are indexed for first time -> do it as early as possible
|
||||
threadPool.runAsync {
|
||||
bankFinder.preloadBankList()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -81,14 +81,7 @@ class BankingModule(internal val mainActivity: AppCompatActivity) {
|
|||
@Provides
|
||||
@Singleton
|
||||
fun provideBankFinder(@Named(IndexFolderKey) indexFolder: File, threadPool: IThreadPool) : IBankFinder {
|
||||
val bankFinder = LuceneBankFinder(indexFolder)
|
||||
|
||||
// preloadBankList asynchronously; on Android it takes approximately 18 seconds till banks are indexed for first time -> do it as early as possible
|
||||
threadPool.runAsync {
|
||||
bankFinder.preloadBankList()
|
||||
}
|
||||
|
||||
return bankFinder
|
||||
return LuceneBankFinder(indexFolder)
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
|
Loading…
Reference in New Issue