mirror of
https://github.com/twofas/2fas-android.git
synced 2024-11-22 02:09:58 +01:00
Fix login requests fetch triggered when device id is missing
This commit is contained in:
parent
54bf4205eb
commit
be0b9b8d88
@ -104,9 +104,11 @@ internal class BrowserExtRepositoryImpl(
|
||||
|
||||
override suspend fun fetchTokenRequests() {
|
||||
return withContext(dispatchers.io) {
|
||||
observeMobileDevice().firstOrNull()?.id?.let { deviceId ->
|
||||
val deviceId = observeMobileDevice().firstOrNull()?.id
|
||||
|
||||
if (deviceId.isNullOrBlank().not()) {
|
||||
localSource.updateTokenRequests(
|
||||
remoteSource.fetchTokenRequests(deviceId).map { it.asDomain() }
|
||||
remoteSource.fetchTokenRequests(deviceId!!).map { it.asDomain() }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user