Skip to content

Commit b1ad7a2

Browse files
committed
Add missing dispose logic.
1 parent 78c85c4 commit b1ad7a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/java/fr/free/nrw/commons/contributions/MainActivity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,11 @@ public boolean onCreateOptionsMenu(Menu menu) {
307307

308308
@SuppressLint("CheckResult")
309309
private void setNotificationCount() {
310-
Observable.fromCallable(() -> notificationController.getNotifications(false))
310+
compositeDisposable.add(Observable.fromCallable(() -> notificationController.getNotifications(false))
311311
.subscribeOn(Schedulers.io())
312312
.observeOn(AndroidSchedulers.mainThread())
313313
.subscribe(this::initNotificationViews,
314-
throwable -> Timber.e(throwable, "Error occurred while loading notifications"));
314+
throwable -> Timber.e(throwable, "Error occurred while loading notifications")));
315315
}
316316

317317
private void initNotificationViews(List<Notification> notificationList) {

0 commit comments

Comments
 (0)