Skip to content

Commit 9aa5336

Browse files
committed
Fix for the crash due to missing environment Keyboard Observer object
1 parent bc962c3 commit 9aa5336

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

QBChat-MVVM/QBChat-MVVM/View/ChatList/ChatListView.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ struct ChatListView: View {
2626
var body: some View {
2727
NavigationView {
2828
List(viewModel.chats) { viewModel in
29-
NavigationLink(destination: ChatDetailView().environmentObject(viewModel)) {
30-
ChatCell(chat: viewModel.state.chat)
29+
NavigationLink(destination: ChatDetailView()
30+
.environmentObject(viewModel)
31+
.environmentObject(KeyboardObserver.shared)) {
32+
ChatCell(chat: viewModel.state.chat)
3133
}
3234
}
3335
.navigationBarTitle("Chats")

0 commit comments

Comments
 (0)