Create new lists from timeline home menu even if no lists

This commit is contained in:
Thomas Ricouard 2024-01-08 18:22:32 +01:00
parent 6af0c36740
commit e725b6be4d

View file

@ -241,19 +241,17 @@ struct TimelineTab: View {
@ViewBuilder @ViewBuilder
private var listsFiltersButons: some View { private var listsFiltersButons: some View {
if !currentAccount.lists.isEmpty { Menu("timeline.filter.lists") {
Menu("timeline.filter.lists") { Button {
ForEach(currentAccount.sortedLists) { list in routerPath.presentedSheet = .listCreate
Button { } label: {
timeline = .list(list: list) Label("account.list.create", systemImage: "plus")
} label: { }
Label(list.title, systemImage: "list.bullet") ForEach(currentAccount.sortedLists) { list in
}
}
Button { Button {
routerPath.presentedSheet = .listCreate timeline = .list(list: list)
} label: { } label: {
Label("account.list.create", systemImage: "plus") Label(list.title, systemImage: "list.bullet")
} }
} }
} }