fix #133, 初期化が終わらない
This commit is contained in:
parent
111f8d046f
commit
a6eed84168
|
@ -407,6 +407,10 @@ class App1 : Application() {
|
|||
|
||||
state = AppState(app_context, pref)
|
||||
appStateX = state
|
||||
|
||||
// getAppState()を使える状態にしてからカラム一覧をロードする
|
||||
log.d("load column list...")
|
||||
state.loadColumnList()
|
||||
|
||||
log.d("prepare() complete! caller=$caller")
|
||||
|
||||
|
|
|
@ -156,7 +156,6 @@ class AppState(internal val context : Context, internal val pref : SharedPrefere
|
|||
App1.custom_emoji_cache.onNetworkChanged()
|
||||
App1.custom_emoji_lister.onNetworkChanged()
|
||||
}
|
||||
loadColumnList()
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////
|
||||
|
@ -264,7 +263,7 @@ class AppState(internal val context : Context, internal val pref : SharedPrefere
|
|||
if(bEnableSpeech) enableSpeech()
|
||||
}
|
||||
|
||||
private fun loadColumnList() {
|
||||
fun loadColumnList() {
|
||||
val list = loadColumnList(context, FILE_COLUMN_LIST)
|
||||
?.objectList()
|
||||
?.mapNotNull { src ->
|
||||
|
|
|
@ -343,7 +343,7 @@ object EmojiDecoder {
|
|||
|
||||
val useEmojioneShortcode = when(val context = options.context) {
|
||||
null -> false
|
||||
else -> Pref.bpEmojioneShortcode(App1.getAppState(context).pref)
|
||||
else -> Pref.bpEmojioneShortcode( Pref.pref(context))
|
||||
}
|
||||
|
||||
splitShortCode(s, callback = object : ShortCodeSplitterCallback {
|
||||
|
|
Loading…
Reference in New Issue