Skip to content

Commit

Permalink
Fix for ItemDetailsViewModel.process NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
Dima-Android committed Dec 23, 2024
1 parent 9522914 commit ec18fac
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import io.realm.ObjectChangeSet
import io.realm.RealmObjectChangeListener
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.cancel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.debounce
import kotlinx.coroutines.flow.launchIn
Expand Down Expand Up @@ -264,6 +265,8 @@ class ItemDetailsViewModel @Inject constructor(
EventBus.getDefault().unregister(this)
conflictResolutionUseCase.currentlyDisplayedItemLibraryIdentifier = null
conflictResolutionUseCase.currentlyDisplayedItemKey = null

coroutineScope.cancel()
super.onCleared()
}

Expand Down

0 comments on commit ec18fac

Please sign in to comment.