use the correct settings in SearchFragment (#1034)
This commit is contained in:
parent
683b06a35d
commit
adf573646e
1 changed files with 4 additions and 2 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue