Skip to content

Commit 552307d

Browse files
committed
Fix detekt issue
1 parent 15ed108 commit 552307d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/linknewdevice/RustLinkMobileHandler.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,18 @@ class RustLinkMobileHandler(
5151
)
5252
// We emit Done in case the progress listener was deallocated before generate() sent the Done
5353
_linkMobileStep.emit(LinkMobileStep.Done)
54-
} catch (e: HumanQrGrantLoginException) {
54+
} catch (e: HumanQrGrantLoginException.NotFound) {
5555
Timber.tag(tag.value).w(e, "Error during QR login grant")
5656
// Catch timeout here?
57-
if (_linkMobileStep.value is LinkMobileStep.QrReady
58-
&& e is HumanQrGrantLoginException.NotFound) {
57+
if (_linkMobileStep.value is LinkMobileStep.QrReady) {
5958
Timber.tag(tag.value).d("Emit QrRotating due to HumanQrGrantLoginException.NotFound")
6059
_linkMobileStep.emit(LinkMobileStep.QrRotating)
6160
} else {
6261
_linkMobileStep.emit(LinkMobileStep.Error(e.map()))
6362
}
63+
} catch (e: HumanQrGrantLoginException) {
64+
Timber.tag(tag.value).w(e, "Error during QR login grant")
65+
_linkMobileStep.emit(LinkMobileStep.Error(e.map()))
6466
}
6567
}
6668

0 commit comments

Comments
 (0)