Destroy chatroom objective C object when entering background to avoid a crash caused by a callstatechagned event from background

This commit is contained in:
QuentinArguillere 2021-06-29 10:23:24 +02:00
parent 7bafd37081
commit 15ff3fd9a6

View file

@ -68,9 +68,11 @@
ChatConversationView *view = VIEW(ChatConversationView);
[view removeCallBacks];
[view.tableController setChatRoom:NULL];
[view setChatRoom:NULL];
} else if (PhoneMainView.instance.currentView == ChatConversationInfoView.compositeViewDescription) {
ChatConversationInfoView *view = VIEW(ChatConversationInfoView);
[view removeCallbacks];
[view setRoom:NULL];
} else if (PhoneMainView.instance.currentView == RecordingsListView.compositeViewDescription || PhoneMainView.instance.currentView == DevicesListView.compositeViewDescription) {
// To avoid crash
[PhoneMainView.instance changeCurrentView:DialerView.compositeViewDescription];