@@ -11,6 +11,9 @@ import com.lagradost.cloudstream3.R
1111import com.lagradost.cloudstream3.SearchQuality
1212import com.lagradost.cloudstream3.mvvm.logError
1313import com.lagradost.cloudstream3.ui.BasePreferenceFragmentCompat
14+ import com.lagradost.cloudstream3.ui.home.HomeChildItemAdapter
15+ import com.lagradost.cloudstream3.ui.home.ParentItemAdapter
16+ import com.lagradost.cloudstream3.ui.search.SearchAdapter
1417import com.lagradost.cloudstream3.ui.search.SearchResultBuilder
1518import com.lagradost.cloudstream3.ui.settings.Globals.EMULATOR
1619import com.lagradost.cloudstream3.ui.settings.Globals.PHONE
@@ -42,12 +45,27 @@ class SettingsUI : BasePreferenceFragmentCompat() {
4245
4346 getPref(R .string.random_button_key)?.hideOn(EMULATOR or TV )
4447
45- (getPref(R .string.overscan_key)?.hideOn(PHONE or EMULATOR ) as ? SeekBarPreference )?.setOnPreferenceChangeListener { perf , newValue ->
48+ (getPref(R .string.overscan_key)?.hideOn(PHONE or EMULATOR ) as ? SeekBarPreference )?.setOnPreferenceChangeListener { pref , newValue ->
4649 val padding = (newValue as ? Int )?.toPx ? : return @setOnPreferenceChangeListener true
47- (perf .context.getActivity() as ? MainActivity )?.binding?.homeRoot?.setPadding(padding, padding, padding, padding)
50+ (pref .context.getActivity() as ? MainActivity )?.binding?.homeRoot?.setPadding(padding, padding, padding, padding)
4851 return @setOnPreferenceChangeListener true
4952 }
5053
54+ getPref(R .string.bottom_title_key)?.setOnPreferenceChangeListener { _, _ ->
55+ HomeChildItemAdapter .sharedPool.clear()
56+ ParentItemAdapter .sharedPool.clear()
57+ SearchAdapter .sharedPool.clear()
58+ true
59+ }
60+
61+ getPref(R .string.poster_size_key)?.setOnPreferenceChangeListener { _, newValue ->
62+ HomeChildItemAdapter .sharedPool.clear()
63+ ParentItemAdapter .sharedPool.clear()
64+ SearchAdapter .sharedPool.clear()
65+ context?.let { HomeChildItemAdapter .updatePosterSize(it, newValue as ? Int ) }
66+ true
67+ }
68+
5169 getPref(R .string.poster_ui_key)?.setOnPreferenceClickListener {
5270 val prefNames = resources.getStringArray(R .array.poster_ui_options)
5371 val keys = resources.getStringArray(R .array.poster_ui_options_values)
0 commit comments