Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
nuno-vieira committed Jan 20, 2025
1 parent 44e89e1 commit d65f904
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/StreamChat/Database/DatabaseContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class DatabaseContainer: NSPersistentContainer, @unchecked Sendable {
"Failed to initialize the in-memory storage with error: \(error). This is a non-recoverable error."
)
}
if chatClientConfig.shouldFlushLocalStorageOnStart {
if chatClientConfig.isClientInActiveMode {
self?.resetEphemeralValues()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public final class DatabaseContainer_Spy: DatabaseContainer, Spy, @unchecked Sen
convenience init(
kind: DatabaseContainer.Kind,
shouldFlushOnStart: Bool = false,
shouldResetEphemeralValuesOnStart: Bool = false,
shouldResetEphemeralValuesOnStart: Bool = true,
localCachingSettings: ChatClientConfig.LocalCaching? = nil,
deletedMessagesVisibility: ChatClientConfig.DeletedMessageVisibility? = nil,
shouldShowShadowedMessages: Bool? = nil,
Expand All @@ -64,7 +64,7 @@ public final class DatabaseContainer_Spy: DatabaseContainer, Spy, @unchecked Sen
config.shouldFlushLocalStorageOnStart = shouldFlushOnStart
}
if shouldResetEphemeralValuesOnStart {
config.isClientInActiveMode = true
config.isClientInActiveMode = shouldResetEphemeralValuesOnStart
}
self.init(
kind: kind,
Expand Down

0 comments on commit d65f904

Please sign in to comment.