Add foreground entry listener to refresh conversation list

This commit is contained in:
Benoit Martins 2025-01-09 15:00:44 +01:00
parent 992afa16cf
commit 0aba4044a1

View file

@ -22,6 +22,8 @@ import linphonesw
struct ConversationsListFragment: View {
@Environment(\.scenePhase) var scenePhase
@EnvironmentObject var navigationManager: NavigationManager
@ObservedObject var conversationViewModel: ConversationViewModel
@ -67,6 +69,11 @@ struct ConversationsListFragment: View {
.padding(.all)
)
}
.onChange(of: scenePhase) { newPhase in
if newPhase == .active {
conversationsListViewModel.computeChatRoomsList(filter: "")
}
}
.navigationTitle("")
.navigationBarHidden(true)
}