mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
Add background app refresh support (#892)
* Add background app refresh support * Cleanup: move methods around so delegates are implemented above privates and privates are ordered better * Add discardableResult on the userSessionStore's refreshRestorationToken
This commit is contained in:
@@ -23,6 +23,14 @@ enum ClientProxyCallback {
|
||||
case receivedAuthError(isSoftLogout: Bool)
|
||||
case receivedNotification(NotificationItemProxyProtocol)
|
||||
case updateRestorationToken
|
||||
|
||||
var isSyncUpdate: Bool {
|
||||
if case .receivedSyncUpdate = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum ClientProxyError: Error {
|
||||
|
||||
@@ -41,6 +41,7 @@ protocol UserSessionStoreProtocol {
|
||||
func userSession(for client: Client) async -> Result<UserSessionProtocol, UserSessionStoreError>
|
||||
|
||||
/// Refresh the restore token of the client for a given session.
|
||||
@discardableResult
|
||||
func refreshRestorationToken(for userSession: UserSessionProtocol) -> Result<Void, UserSessionStoreError>
|
||||
|
||||
/// Logs out of the specified session.
|
||||
|
||||
Reference in New Issue
Block a user