Split out appearance settings from general section

This commit is contained in:
arkon
2021-08-23 12:24:30 -04:00
parent 6240fe1dfc
commit 0493e77cff
6 changed files with 200 additions and 141 deletions

View File

@@ -23,7 +23,8 @@ class ThemesPreferenceAdapter(private val clickListener: OnItemClickListener) :
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ThemeViewHolder {
val themeResIds = BaseThemedActivity.getThemeResIds(themes[viewType], preferences.themeDarkAmoled().get())
val themedContext = themeResIds.fold(parent.context) {
context, themeResId -> ContextThemeWrapper(context, themeResId)
context, themeResId ->
ContextThemeWrapper(context, themeResId)
}
binding = PrefThemeItemBinding.inflate(LayoutInflater.from(themedContext), parent, false)