mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Timer info messages *before* the message which changed the timer
// FREEBIE
This commit is contained in:
parent
a9e7c5e879
commit
eb140a6839
2 changed files with 12 additions and 4 deletions
|
@ -49,6 +49,13 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldUseReceiptDateForSorting
|
||||||
|
{
|
||||||
|
// Use the timestamp, not the "received at" timestamp to sort,
|
||||||
|
// since we're creating these interactions after the fact and back-dating them.
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
- (NSString *)description
|
- (NSString *)description
|
||||||
{
|
{
|
||||||
if (self.createdByRemoteName) {
|
if (self.createdByRemoteName) {
|
||||||
|
|
|
@ -254,16 +254,17 @@ void AssertIsOnDisappearingMessagesQueue()
|
||||||
NSString *contactName = [contactsManager displayNameForPhoneIdentifier:incomingMessage.messageAuthorId];
|
NSString *contactName = [contactsManager displayNameForPhoneIdentifier:incomingMessage.messageAuthorId];
|
||||||
|
|
||||||
// We want the info message to appear _before_ the message.
|
// We want the info message to appear _before_ the message.
|
||||||
[[[OWSDisappearingConfigurationUpdateInfoMessage alloc] initWithTimestamp:message.timestamp - 1
|
[[[OWSDisappearingConfigurationUpdateInfoMessage alloc] initWithTimestamp:message.timestampForSorting - 1
|
||||||
thread:message.thread
|
thread:message.thread
|
||||||
configuration:disappearingMessagesConfiguration
|
configuration:disappearingMessagesConfiguration
|
||||||
createdByRemoteName:contactName] saveWithTransaction:transaction];
|
createdByRemoteName:contactName]
|
||||||
|
saveWithTransaction:transaction];
|
||||||
} else {
|
} else {
|
||||||
// We want the info message to appear _before_ the message.
|
// We want the info message to appear _before_ the message.
|
||||||
[[[OWSDisappearingConfigurationUpdateInfoMessage alloc] initWithTimestamp:message.timestamp - 1
|
[[[OWSDisappearingConfigurationUpdateInfoMessage alloc] initWithTimestamp:message.timestampForSorting - 1
|
||||||
thread:message.thread
|
thread:message.thread
|
||||||
configuration:disappearingMessagesConfiguration]
|
configuration:disappearingMessagesConfiguration]
|
||||||
saveWithTransaction:transaction];
|
saveWithTransaction:transaction];
|
||||||
}
|
}
|
||||||
|
|
||||||
backgroundTask = nil;
|
backgroundTask = nil;
|
||||||
|
|
Loading…
Reference in a new issue