Fix: Memory Leak while syncing repo

This commit is contained in:
LooKeR
2021-10-23 00:28:50 +05:30
parent 424823dab2
commit 0512bc884a
3 changed files with 11 additions and 7 deletions

View File

@ -348,7 +348,7 @@ class SyncService : ConnectionService<SyncService.Binder>() {
val unstable = Preferences[Preferences.Key.UpdateUnstable]
lateinit var disposable: Disposable
disposable = RepositoryUpdater
.update(repository, unstable) { stage, progress, total ->
.update(this, repository, unstable) { stage, progress, total ->
if (!disposable.isDisposed) {
stateSubject.onNext(
State.Syncing(