mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Fix disappearing messages
This commit is contained in:
parent
4dda59b446
commit
2a57b8ab5b
|
@ -875,7 +875,8 @@ static CGRect oldframe;
|
|||
[infoMessage saveWithTransaction:transaction];
|
||||
|
||||
SNExpirationTimerUpdate *expirationTimerUpdate = [SNExpirationTimerUpdate new];
|
||||
expirationTimerUpdate.duration = self.disappearingMessagesConfiguration.durationSeconds;
|
||||
BOOL isEnabled = self.disappearingMessagesConfiguration.enabled;
|
||||
expirationTimerUpdate.duration = isEnabled ? self.disappearingMessagesConfiguration.durationSeconds : 0;
|
||||
[SNMessageSender send:expirationTimerUpdate inThread:self.thread usingTransaction:transaction];
|
||||
}];
|
||||
}
|
||||
|
|
|
@ -46,6 +46,8 @@ extension Storage {
|
|||
/// Also touches the associated message.
|
||||
public func setAttachmentState(to state: TSAttachmentPointerState, for pointer: TSAttachmentPointer, associatedWith tsIncomingMessageID: String, using transaction: Any) {
|
||||
let transaction = transaction as! YapDatabaseReadWriteTransaction
|
||||
// Workaround for some YapDatabase funkiness where pointer at this point can actually be a TSAttachmentStream
|
||||
guard pointer.responds(to: #selector(setter: TSAttachmentPointer.state)) else { return }
|
||||
pointer.state = state
|
||||
pointer.save(with: transaction)
|
||||
guard let tsIncomingMessage = TSIncomingMessage.fetch(uniqueId: tsIncomingMessageID, transaction: transaction) else { return }
|
||||
|
|
Loading…
Reference in a new issue