Fix crash from leftover linked device change.
This commit is contained in:
parent
3909c4bc83
commit
a4ba79d949
1 changed files with 0 additions and 9 deletions
|
@ -9,8 +9,6 @@ import kotlinx.coroutines.flow.asStateFlow
|
|||
import kotlinx.coroutines.flow.update
|
||||
import kotlinx.coroutines.launch
|
||||
import org.signal.core.util.logging.Log
|
||||
import org.thoughtcrime.securesms.dependencies.AppDependencies
|
||||
import org.thoughtcrime.securesms.jobmanager.JobTracker
|
||||
import org.thoughtcrime.securesms.jobs.LinkedDeviceInactiveCheckJob
|
||||
import org.thoughtcrime.securesms.linkdevice.LinkDeviceRepository.LinkDeviceResult
|
||||
import org.thoughtcrime.securesms.linkdevice.LinkDeviceRepository.getPlaintextDeviceName
|
||||
|
@ -35,17 +33,10 @@ class LinkDeviceViewModel : ViewModel() {
|
|||
private val _state = MutableStateFlow(LinkDeviceSettingsState())
|
||||
val state = _state.asStateFlow()
|
||||
|
||||
private lateinit var listener: JobTracker.JobListener
|
||||
|
||||
fun initialize() {
|
||||
loadDevices()
|
||||
}
|
||||
|
||||
override fun onCleared() {
|
||||
super.onCleared()
|
||||
AppDependencies.jobManager.removeListener(listener)
|
||||
}
|
||||
|
||||
fun setDeviceToRemove(device: Device?) {
|
||||
_state.update { it.copy(deviceToRemove = device) }
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue