Skip to content

Commit

Permalink
do not handle offline mode yet
Browse files Browse the repository at this point in the history
  • Loading branch information
Velin92 committed Jan 29, 2025
1 parent df997ad commit 5a4bc34
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 4 additions & 8 deletions ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated using Sourcery 2.2.6 — https://github.com/krzysztofzablocki/Sourcery
// Generated using Sourcery 2.2.5 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT

// swiftlint:disable all
Expand Down Expand Up @@ -19242,7 +19242,6 @@ open class SyncServiceSDKMock: MatrixRustSDK.SyncService, @unchecked Sendable {

//MARK: - stop

open var stopThrowableError: Error?
var stopUnderlyingCallsCount = 0
open var stopCallsCount: Int {
get {
Expand Down Expand Up @@ -19270,14 +19269,11 @@ open class SyncServiceSDKMock: MatrixRustSDK.SyncService, @unchecked Sendable {
open var stopCalled: Bool {
return stopCallsCount > 0
}
open var stopClosure: (() async throws -> Void)?
open var stopClosure: (() async -> Void)?

open override func stop() async throws {
if let error = stopThrowableError {
throw error
}
open override func stop() async {
stopCallsCount += 1
try await stopClosure?()
await stopClosure?()
}
}
open class SyncServiceBuilderSDKMock: MatrixRustSDK.SyncServiceBuilder, @unchecked Sendable {
Expand Down
3 changes: 3 additions & 0 deletions ElementX/Sources/Services/Client/ClientProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,9 @@ class ClientProxy: ClientProxyProtocol {
break
case .error:
restartSync()
case .offline:

Check failure on line 864 in ElementX/Sources/Services/Client/ClientProxy.swift

View workflow job for this annotation

GitHub Actions / Tests

type 'SyncServiceState' has no member 'offline'

Check failure on line 864 in ElementX/Sources/Services/Client/ClientProxy.swift

View workflow job for this annotation

GitHub Actions / Tests

type 'SyncServiceState' has no member 'offline'

Check failure on line 864 in ElementX/Sources/Services/Client/ClientProxy.swift

View workflow job for this annotation

GitHub Actions / Tests (Enterprise)

type 'SyncServiceState' has no member 'offline'

Check failure on line 864 in ElementX/Sources/Services/Client/ClientProxy.swift

View workflow job for this annotation

GitHub Actions / Tests (Enterprise)

type 'SyncServiceState' has no member 'offline'
// This needs to be enabled in the client builder first to be actually used
break
}
})
}
Expand Down

0 comments on commit 5a4bc34

Please sign in to comment.