fix #133, 初期化が終わらない

This commit is contained in:
tateisu 2020-02-13 01:20:15 +09:00
parent 111f8d046f
commit a6eed84168
3 changed files with 6 additions and 3 deletions

View File

@ -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")

View File

@ -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 ->

View File

@ -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 {