Skip to content

Commit

Permalink
summary無いときに落ちるので対策
Browse files Browse the repository at this point in the history
  • Loading branch information
takusan23 committed Nov 1, 2020
1 parent 7795ce4 commit 4e524ab
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,14 @@ class SearchPreferenceViewModel(application: Application, private val preference
}
// 属性の方を優先して登録する。なければ遷移先Fragment
pref.fragment = fragmentAttr ?: fragmentName
val data = SearchPreferenceParseData(pref, xmlResId, pref.title.toString(), pref.summary.toString(), categoryName, fragmentName)
val data = SearchPreferenceParseData(
preference = pref,
resId = xmlResId,
preferenceTitle = pref.title.toString(),
preferenceSummary = pref.summary?.toString(),
preferenceCategory = categoryName,
fragmentName = fragmentName
)
preferenceList.value?.add(data)
pref.setOnPreferenceClickListener {
changePreferenceScreen.value = data
Expand Down

0 comments on commit 4e524ab

Please sign in to comment.