QR login from device manager (#6818)

* Add link device button into the sessions overview screen

* Run Swift format

* Fix tests

* Fix a crash in tests

* Fix PR remark
This commit is contained in:
ismailgulek
2022-10-07 12:58:26 +03:00
committed by GitHub
parent f15e9928b8
commit 09124c2243
33 changed files with 223 additions and 126 deletions
@@ -25,7 +25,6 @@ enum OtherUserSessionsFilter {
}
class UserOtherSessionsViewModel: UserOtherSessionsViewModelType, UserOtherSessionsViewModelProtocol {
var completion: ((UserOtherSessionsViewModelResult) -> Void)?
private let sessionInfos: [UserSessionInfo]
@@ -42,7 +41,7 @@ class UserOtherSessionsViewModel: UserOtherSessionsViewModelType, UserOtherSessi
override func process(viewAction: UserOtherSessionsViewAction) {
switch viewAction {
case let .userOtherSessionSelected(sessionId: sessionId):
guard let session = sessionInfos.first(where: {$0.id == sessionId}) else {
guard let session = sessionInfos.first(where: { $0.id == sessionId }) else {
assertionFailure("Session should exist in the array.")
return
}