mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Add foreground entry listener to refresh conversation list
This commit is contained in:
parent
992afa16cf
commit
0aba4044a1
1 changed files with 7 additions and 0 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue