mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
QR Code Login Initial view state (#2667)
This commit is contained in:
@@ -2338,6 +2338,26 @@ class PollInteractionHandlerMock: PollInteractionHandlerProtocol {
|
||||
}
|
||||
}
|
||||
}
|
||||
class QRCodeLoginServiceMock: QRCodeLoginServiceProtocol {
|
||||
|
||||
//MARK: - requestAuthorizationIfNeeded
|
||||
|
||||
var requestAuthorizationIfNeededCallsCount = 0
|
||||
var requestAuthorizationIfNeededCalled: Bool {
|
||||
return requestAuthorizationIfNeededCallsCount > 0
|
||||
}
|
||||
var requestAuthorizationIfNeededReturnValue: Bool!
|
||||
var requestAuthorizationIfNeededClosure: (() async -> Bool)?
|
||||
|
||||
func requestAuthorizationIfNeeded() async -> Bool {
|
||||
requestAuthorizationIfNeededCallsCount += 1
|
||||
if let requestAuthorizationIfNeededClosure = requestAuthorizationIfNeededClosure {
|
||||
return await requestAuthorizationIfNeededClosure()
|
||||
} else {
|
||||
return requestAuthorizationIfNeededReturnValue
|
||||
}
|
||||
}
|
||||
}
|
||||
class RoomDirectorySearchProxyMock: RoomDirectorySearchProxyProtocol {
|
||||
var resultsPublisher: CurrentValuePublisher<[RoomDirectorySearchResult], Never> {
|
||||
get { return underlyingResultsPublisher }
|
||||
|
||||
Reference in New Issue
Block a user