mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 13:33:42 +00:00
Honor "Keep channels with unwatched videos on top of subscriptions list"
setting in sidebar
This commit is contained in:
parent
3c9e04d243
commit
99ffaed5fc
@ -16,7 +16,7 @@ struct AppSidebarSubscriptions: View {
|
||||
|
||||
var body: some View {
|
||||
Section(header: Text("Subscriptions")) {
|
||||
ForEach(subscriptions.all) { channel in
|
||||
ForEach(channels) { channel in
|
||||
NavigationLink(tag: TabSelection.channel(channel.id), selection: $navigation.tabSelection) {
|
||||
LazyView(ChannelVideosView(channel: channel))
|
||||
} label: {
|
||||
@ -44,6 +44,10 @@ struct AppSidebarSubscriptions: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var channels: [Channel] {
|
||||
keepChannelsWithUnwatchedFeedOnTop ? subscriptions.allByUnwatchedCount : subscriptions.all
|
||||
}
|
||||
}
|
||||
|
||||
struct AppSidebarSubscriptions_Previews: PreviewProvider {
|
||||
|
Loading…
Reference in New Issue
Block a user