Fix envObject for iPad

This commit is contained in:
Thomas Ricouard 2023-01-06 21:34:24 +01:00
parent c9c0bda69e
commit b30610538f
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,6 @@ struct MessagesTab: View {
} }
} }
.id(currentAccount.account?.id) .id(currentAccount.account?.id)
.environmentObject(routeurPath)
} }
.onChange(of: $popToRootTab.wrappedValue) { popToRootTab in .onChange(of: $popToRootTab.wrappedValue) { popToRootTab in
if popToRootTab == .messages { if popToRootTab == .messages {
@ -39,5 +38,6 @@ struct MessagesTab: View {
routeurPath.client = client routeurPath.client = client
watcher.unreadMessagesCount = 0 watcher.unreadMessagesCount = 0
} }
.environmentObject(routeurPath)
} }
} }

View File

@ -51,7 +51,7 @@ public struct ConversationsListView: View {
.navigationTitle("Direct Messages") .navigationTitle("Direct Messages")
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
.toolbar { .toolbar {
statusEditorToolbarItem(routeurPath: routeurPath, visibility: .direct) StatusEditorToolbarItem(visibility: .direct)
} }
.onChange(of: watcher.latestEvent?.id) { id in .onChange(of: watcher.latestEvent?.id) { id in
if let latestEvent = watcher.latestEvent { if let latestEvent = watcher.latestEvent {