Fixes
This commit is contained in:
parent
9f009376f5
commit
e7264a0525
@ -11,7 +11,7 @@ struct IceCubesApp: App {
|
|||||||
|
|
||||||
@Environment(\.scenePhase) private var scenePhase
|
@Environment(\.scenePhase) private var scenePhase
|
||||||
@StateObject private var appAccountsManager = AppAccountsManager()
|
@StateObject private var appAccountsManager = AppAccountsManager()
|
||||||
@StateObject private var currenInstance = CurrentInstance()
|
@StateObject private var currentInstance = CurrentInstance()
|
||||||
@StateObject private var currentAccount = CurrentAccount()
|
@StateObject private var currentAccount = CurrentAccount()
|
||||||
@StateObject private var watcher = StreamWatcher()
|
@StateObject private var watcher = StreamWatcher()
|
||||||
@StateObject private var quickLook = QuickLook()
|
@StateObject private var quickLook = QuickLook()
|
||||||
@ -54,7 +54,7 @@ struct IceCubesApp: App {
|
|||||||
.environmentObject(appAccountsManager.currentClient)
|
.environmentObject(appAccountsManager.currentClient)
|
||||||
.environmentObject(quickLook)
|
.environmentObject(quickLook)
|
||||||
.environmentObject(currentAccount)
|
.environmentObject(currentAccount)
|
||||||
.environmentObject(currenInstance)
|
.environmentObject(currentInstance)
|
||||||
.environmentObject(theme)
|
.environmentObject(theme)
|
||||||
.environmentObject(watcher)
|
.environmentObject(watcher)
|
||||||
.quickLookPreview($quickLook.url, in: quickLook.urls)
|
.quickLookPreview($quickLook.url, in: quickLook.urls)
|
||||||
@ -75,7 +75,7 @@ struct IceCubesApp: App {
|
|||||||
|
|
||||||
private func setNewClientsInEnv(client: Client) {
|
private func setNewClientsInEnv(client: Client) {
|
||||||
currentAccount.setClient(client: client)
|
currentAccount.setClient(client: client)
|
||||||
currenInstance.setClient(client: client)
|
currentInstance.setClient(client: client)
|
||||||
watcher.setClient(client: client)
|
watcher.setClient(client: client)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ struct TimelineTab: View {
|
|||||||
.withAppRouteur()
|
.withAppRouteur()
|
||||||
.withSheetDestinations(sheetDestinations: $routeurPath.presentedSheet)
|
.withSheetDestinations(sheetDestinations: $routeurPath.presentedSheet)
|
||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItem(placement: .principal) {
|
ToolbarTitleMenu {
|
||||||
timelineFilterButton
|
timelineFilterButton
|
||||||
}
|
}
|
||||||
if client.isAuth {
|
if client.isAuth {
|
||||||
@ -60,27 +60,13 @@ struct TimelineTab: View {
|
|||||||
|
|
||||||
|
|
||||||
private var timelineFilterButton: some View {
|
private var timelineFilterButton: some View {
|
||||||
Menu {
|
ForEach(TimelineFilter.availableTimeline(client: client), id: \.self) { timeline in
|
||||||
ForEach(TimelineFilter.availableTimeline(client: client), id: \.self) { timeline in
|
Button {
|
||||||
Button {
|
self.timeline = timeline
|
||||||
self.timeline = timeline
|
} label: {
|
||||||
} label: {
|
Label(timeline.title(), systemImage: timeline.iconName() ?? "")
|
||||||
Label(timeline.title(), systemImage: timeline.iconName() ?? "")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} label: {
|
|
||||||
HStack {
|
|
||||||
Text(timeline.title())
|
|
||||||
Image(systemName: "chevron.down")
|
|
||||||
.resizable()
|
|
||||||
.aspectRatio(contentMode: .fit)
|
|
||||||
.frame(width: 12)
|
|
||||||
.offset(y: 2)
|
|
||||||
}
|
|
||||||
.font(.headline)
|
|
||||||
.foregroundColor(theme.labelColor)
|
|
||||||
}
|
}
|
||||||
.menuStyle(.button)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private var accountButton: some View {
|
private var accountButton: some View {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user