Make the selection of tags and source filters exclusive (#399)
* Make the selection of tags and source filters exclusive * Update changelog
This commit is contained in:
parent
ca5186d20a
commit
9693dec807
@ -44,6 +44,8 @@
|
||||
|
||||
- Closing #236. New sources can be added in Selfoss 2.19.
|
||||
|
||||
- Closing #397 and #355. Tag and Sources filters are now exclusive.
|
||||
|
||||
- Dropped support for android 4, the last version supporting it is v1721030811
|
||||
|
||||
**1.6.x**
|
||||
|
@ -101,9 +101,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
||||
private var fullHeightCards: Boolean = false
|
||||
private var itemsNumber: Int = 200
|
||||
private var elementsShown: Int = 1
|
||||
private var maybeTagFilter: Tag? = null
|
||||
private var maybeSourceFilter: Source? = null
|
||||
private var maybeSearchFilter: String? = null
|
||||
private var userIdentifier: String = ""
|
||||
private var displayAccountHeader: Boolean = false
|
||||
private var infiniteScroll: Boolean = false
|
||||
@ -563,8 +560,9 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
||||
color = ColorHolder.fromColor(appColors.colorAccent) }
|
||||
onDrawerItemClickListener = { _,_,_ ->
|
||||
allItems = ArrayList()
|
||||
maybeTagFilter = it
|
||||
SharedItems.tagFilter = it.tag
|
||||
SharedItems.sourceFilter = null
|
||||
SharedItems.sourceIDFilter = null
|
||||
getElementsAccordingToTab()
|
||||
fetchOnEmptyList()
|
||||
false
|
||||
@ -615,8 +613,9 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
||||
color = ColorHolder.fromColor(appColors.colorAccent) }
|
||||
onDrawerItemClickListener = { _,_,_ ->
|
||||
allItems = ArrayList()
|
||||
maybeTagFilter = it
|
||||
SharedItems.tagFilter = it.tag
|
||||
SharedItems.sourceFilter = null
|
||||
SharedItems.sourceIDFilter = null
|
||||
getElementsAccordingToTab()
|
||||
fetchOnEmptyList()
|
||||
false
|
||||
@ -650,9 +649,9 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
||||
iconUrl = source.getIcon(this@HomeActivity)
|
||||
onDrawerItemClickListener = { _,_,_ ->
|
||||
allItems = ArrayList()
|
||||
maybeSourceFilter = source
|
||||
SharedItems.sourceIDFilter = source.id.toLong()
|
||||
SharedItems.sourceFilter = source.title
|
||||
SharedItems.tagFilter = null
|
||||
getElementsAccordingToTab()
|
||||
fetchOnEmptyList()
|
||||
false
|
||||
@ -673,11 +672,10 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
||||
badgeRes = R.string.drawer_action_clear
|
||||
onDrawerItemClickListener = { _,_,_ ->
|
||||
allItems = ArrayList()
|
||||
maybeSourceFilter = null
|
||||
SharedItems.sourceFilter = null
|
||||
SharedItems.sourceIDFilter = null
|
||||
maybeTagFilter = null
|
||||
SharedItems.tagFilter = null
|
||||
binding.mainDrawer.setSelectionAtPosition(-1)
|
||||
getElementsAccordingToTab()
|
||||
fetchOnEmptyList()
|
||||
false
|
||||
@ -1122,7 +1120,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
||||
|
||||
override fun onQueryTextChange(p0: String?): Boolean {
|
||||
if (p0.isNullOrBlank()) {
|
||||
maybeSearchFilter = null
|
||||
SharedItems.searchFilter = null
|
||||
getElementsAccordingToTab()
|
||||
fetchOnEmptyList()
|
||||
@ -1131,7 +1128,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
||||
}
|
||||
|
||||
override fun onQueryTextSubmit(p0: String?): Boolean {
|
||||
maybeSearchFilter = p0
|
||||
SharedItems.searchFilter = p0
|
||||
getElementsAccordingToTab()
|
||||
fetchOnEmptyList()
|
||||
|
Loading…
Reference in New Issue
Block a user