use the correct settings in SearchFragment (#1034)
This commit is contained in:
parent
683b06a35d
commit
adf573646e
|
@ -61,10 +61,12 @@ class SearchFragment : SFragment(), StatusActionListener, Injectable {
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
val preferences = PreferenceManager.getDefaultSharedPreferences(view.context)
|
val preferences = PreferenceManager.getDefaultSharedPreferences(view.context)
|
||||||
alwaysShowSensitiveMedia = preferences.getBoolean("alwaysShowSensitiveMedia", false)
|
|
||||||
mediaPreviewEnabled = preferences.getBoolean("mediaPreviewEnabled", true)
|
|
||||||
useAbsoluteTime = preferences.getBoolean("absoluteTimeView", false)
|
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.addItemDecoration(DividerItemDecoration(view.context, DividerItemDecoration.VERTICAL))
|
||||||
searchRecyclerView.layoutManager = LinearLayoutManager(view.context)
|
searchRecyclerView.layoutManager = LinearLayoutManager(view.context)
|
||||||
searchAdapter = SearchResultsAdapter(
|
searchAdapter = SearchResultsAdapter(
|
||||||
|
|
Loading…
Reference in New Issue