Skip to content

Commit 34fc423

Browse files
committed
Sort Media Gallery items from most recent to oldest
A side effect of this commit is that in the old chatview, when the image viewer is open, seeing the previous attachments requires swiping to the left rather than to the right (which actually matches the behavior of the new chatview)
1 parent 0dbef6a commit 34fc423

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Monal/Classes/DataLayer.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2384,7 +2384,7 @@ -(void) unPinChat:(NSNumber*) accountID andBuddyJid:(NSString*) buddyJid
23842384
return nil;
23852385

23862386
return [self.db idReadTransaction:^{
2387-
NSString* query = @"SELECT message_history_id FROM message_history WHERE messageType=? AND account_id=? AND buddy_name=? GROUP BY message ORDER BY message_history_id ASC;";
2387+
NSString* query = @"SELECT message_history_id FROM message_history WHERE messageType=? AND account_id=? AND buddy_name=? GROUP BY message ORDER BY message_history_id DESC;";
23882388
NSArray* params = @[kMessageTypeFiletransfer, accountID, contact];
23892389

23902390
NSMutableArray* retval = [NSMutableArray new];

0 commit comments

Comments
 (0)