From adf573646e4135951e25146468f018cc50cf1636 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Mon, 11 Feb 2019 21:24:43 +0100 Subject: [PATCH] use the correct settings in SearchFragment (#1034) --- .../java/com/keylesspalace/tusky/fragment/SearchFragment.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/SearchFragment.kt b/app/src/main/java/com/keylesspalace/tusky/fragment/SearchFragment.kt index 33e0a2adc..4250adfb1 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/SearchFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/SearchFragment.kt @@ -61,10 +61,12 @@ class SearchFragment : SFragment(), StatusActionListener, Injectable { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { val preferences = PreferenceManager.getDefaultSharedPreferences(view.context) - alwaysShowSensitiveMedia = preferences.getBoolean("alwaysShowSensitiveMedia", false) - mediaPreviewEnabled = preferences.getBoolean("mediaPreviewEnabled", true) useAbsoluteTime = preferences.getBoolean("absoluteTimeView", false) + val account = accountManager.activeAccount + alwaysShowSensitiveMedia = account?.alwaysShowSensitiveMedia ?: false + mediaPreviewEnabled = account?.mediaPreviewEnabled ?: true + searchRecyclerView.addItemDecoration(DividerItemDecoration(view.context, DividerItemDecoration.VERTICAL)) searchRecyclerView.layoutManager = LinearLayoutManager(view.context) searchAdapter = SearchResultsAdapter(