From e725b6be4d1ab32e95694495c404e6313238c74a Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Mon, 8 Jan 2024 18:22:32 +0100 Subject: [PATCH] Create new lists from timeline home menu even if no lists --- .../App/Tabs/Timeline/TimelineTab.swift | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift b/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift index 82058568..6883504c 100644 --- a/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift +++ b/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift @@ -241,19 +241,17 @@ struct TimelineTab: View { @ViewBuilder private var listsFiltersButons: some View { - if !currentAccount.lists.isEmpty { - Menu("timeline.filter.lists") { - ForEach(currentAccount.sortedLists) { list in - Button { - timeline = .list(list: list) - } label: { - Label(list.title, systemImage: "list.bullet") - } - } + Menu("timeline.filter.lists") { + Button { + routerPath.presentedSheet = .listCreate + } label: { + Label("account.list.create", systemImage: "plus") + } + ForEach(currentAccount.sortedLists) { list in Button { - routerPath.presentedSheet = .listCreate + timeline = .list(list: list) } label: { - Label("account.list.create", systemImage: "plus") + Label(list.title, systemImage: "list.bullet") } } }