WIP: clean up

pull/941/head
Ryan Zhao 2 years ago
parent 09e1c02e1d
commit 75df800c65

@ -141,7 +141,7 @@ class ThreadDisappearingMessagesSettingsViewModel: SessionTableViewModel<ThreadD
.with( .with(
isEnabled: false, isEnabled: false,
durationSeconds: 0, durationSeconds: 0,
type: nil, type: .unknown,
lastChangeTimestampMs: SnodeAPI.currentOffsetTimestampMs() lastChangeTimestampMs: SnodeAPI.currentOffsetTimestampMs()
) )
self?.shouldShowConfirmButton.send(updatedConfig != config) self?.shouldShowConfirmButton.send(updatedConfig != config)
@ -315,7 +315,7 @@ class ThreadDisappearingMessagesSettingsViewModel: SessionTableViewModel<ThreadD
.with( .with(
isEnabled: false, isEnabled: false,
durationSeconds: 0, durationSeconds: 0,
type: nil, type: .unknown,
lastChangeTimestampMs: SnodeAPI.currentOffsetTimestampMs() lastChangeTimestampMs: SnodeAPI.currentOffsetTimestampMs()
) )
self?.shouldShowConfirmButton.send(updatedConfig != config) self?.shouldShowConfirmButton.send(updatedConfig != config)
@ -425,7 +425,7 @@ class ThreadDisappearingMessagesSettingsViewModel: SessionTableViewModel<ThreadD
.with( .with(
isEnabled: false, isEnabled: false,
durationSeconds: 0, durationSeconds: 0,
type: nil, type: .unknown,
lastChangeTimestampMs: SnodeAPI.currentOffsetTimestampMs() lastChangeTimestampMs: SnodeAPI.currentOffsetTimestampMs()
) )
self?.shouldShowConfirmButton.send(updatedConfig != config) self?.shouldShowConfirmButton.send(updatedConfig != config)

@ -87,7 +87,7 @@ public extension DisappearingMessagesConfiguration {
threadId: threadId, threadId: threadId,
isEnabled: (isEnabled ?? self.isEnabled), isEnabled: (isEnabled ?? self.isEnabled),
durationSeconds: (durationSeconds ?? self.durationSeconds), durationSeconds: (durationSeconds ?? self.durationSeconds),
type: (isEnabled == false) ? nil : (type ?? self.type), type: (isEnabled == false) ? .unknown : (type ?? self.type),
lastChangeTimestampMs: (lastChangeTimestampMs ?? self.lastChangeTimestampMs) lastChangeTimestampMs: (lastChangeTimestampMs ?? self.lastChangeTimestampMs)
) )
} }

Loading…
Cancel
Save