mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 08:39:22 +01:00
Fix MessageCountsViewModel memory leak.
This commit is contained in:
committed by
Greyson Parrelli
parent
b04acd8ae0
commit
e472760d92
@@ -39,6 +39,10 @@ public class MessageCountsViewModel extends ViewModel {
|
||||
return counts;
|
||||
}
|
||||
|
||||
if (observer != null) {
|
||||
ApplicationDependencies.getDatabaseObserver().unregisterObserver(observer);
|
||||
}
|
||||
|
||||
observer = new DatabaseObserver.Observer() {
|
||||
private int previousUnreadCount = -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user