mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Refresh displayed friend when the contacts list is updated
This commit is contained in:
parent
b904f71f79
commit
a421d90d0c
1 changed files with 7 additions and 1 deletions
|
|
@ -173,6 +173,12 @@ final class MagicSearchSingleton: ObservableObject {
|
|||
addedAvatarListModel: [ContactAvatarModel]
|
||||
) {
|
||||
DispatchQueue.main.async {
|
||||
if SharedMainViewModel.shared.displayedFriend != nil {
|
||||
if let avatarModel = addedAvatarListModel.first(where: { $0.address == SharedMainViewModel.shared.displayedFriend?.address }) {
|
||||
SharedMainViewModel.shared.displayedFriend = avatarModel
|
||||
}
|
||||
}
|
||||
|
||||
self.contactsManager.lastSearch = sortedLastSearch
|
||||
self.contactsManager.lastSearchSuggestions = lastSearchSuggestions
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue