mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
Merge pull request #4808 from Bnyro/master
fix: wrong channel group shown as selected
This commit is contained in:
commit
70689ea448
@ -193,9 +193,6 @@ class SubscriptionsFragment : Fragment() {
|
|||||||
val groups = DatabaseHolder.Database.subscriptionGroupsDao().getAll()
|
val groups = DatabaseHolder.Database.subscriptionGroupsDao().getAll()
|
||||||
.sortedBy { it.index }
|
.sortedBy { it.index }
|
||||||
channelGroupsModel.groups.postValue(groups)
|
channelGroupsModel.groups.postValue(groups)
|
||||||
withContext(Dispatchers.Main) {
|
|
||||||
initChannelGroups()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,12 +238,13 @@ class SubscriptionsFragment : Fragment() {
|
|||||||
setOnLongClickListener {
|
setOnLongClickListener {
|
||||||
// the index must be increased by one to skip the "all channels" group button
|
// the index must be increased by one to skip the "all channels" group button
|
||||||
playByGroup(index + 1)
|
playByGroup(index + 1)
|
||||||
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.channelGroups.addView(chip)
|
binding.channelGroups.addView(chip)
|
||||||
|
|
||||||
|
if (index + 1 == selectedFilterGroup) binding.channelGroups.check(chip.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user