mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 23:48:29 +02:00
Retrying & deleting failed messages
- Display an exclamation mark (on a red background). In case of a multi-line message - When a message with an error is selected, show a bottom bar with the 4 following actions: Retry - Delete - Edit - Copy - If users press on Delete, a confirmation dialog is displayed - When error messages occur, a general error message appears above the composer. Selecting Delete will delete all error messages. Pressing on Retry will attempt to resend error messages - If users press on Delete, a confirmation dialog is displayed - In room lists, decorate rooms with errored messages with the error icon. Rooms with errors should be sorted first
This commit is contained in:
@@ -1294,6 +1294,18 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
|
||||
// Sort each rooms collection by considering first the rooms with some missed notifs, the rooms with unread, then the others.
|
||||
comparator = ^NSComparisonResult(id<MXKRecentCellDataStoring> recentCellData1, id<MXKRecentCellDataStoring> recentCellData2) {
|
||||
|
||||
if (recentCellData1.roomSummary.room.sentStatus != MXRoomSentStatusOk
|
||||
&& recentCellData2.roomSummary.room.sentStatus == MXRoomSentStatusOk)
|
||||
{
|
||||
return NSOrderedAscending;
|
||||
}
|
||||
|
||||
if (recentCellData2.roomSummary.room.sentStatus != MXRoomSentStatusOk
|
||||
&& recentCellData1.roomSummary.room.sentStatus == MXRoomSentStatusOk)
|
||||
{
|
||||
return NSOrderedDescending;
|
||||
}
|
||||
|
||||
if (recentCellData1.highlightCount)
|
||||
{
|
||||
if (recentCellData2.highlightCount)
|
||||
@@ -1351,6 +1363,18 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
|
||||
// Sort each rooms collection by considering first the rooms with some unread messages then the others.
|
||||
comparator = ^NSComparisonResult(id<MXKRecentCellDataStoring> recentCellData1, id<MXKRecentCellDataStoring> recentCellData2) {
|
||||
|
||||
if (recentCellData1.roomSummary.room.sentStatus != MXRoomSentStatusOk
|
||||
&& recentCellData2.roomSummary.room.sentStatus == MXRoomSentStatusOk)
|
||||
{
|
||||
return NSOrderedAscending;
|
||||
}
|
||||
|
||||
if (recentCellData2.roomSummary.room.sentStatus != MXRoomSentStatusOk
|
||||
&& recentCellData1.roomSummary.room.sentStatus == MXRoomSentStatusOk)
|
||||
{
|
||||
return NSOrderedDescending;
|
||||
}
|
||||
|
||||
if (recentCellData1.hasUnread)
|
||||
{
|
||||
if (recentCellData2.hasUnread)
|
||||
@@ -1389,6 +1413,24 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
|
||||
return [session compareRoomsByTag:kMXRoomTagFavourite room1:recentCellData1.roomSummary.room room2:recentCellData2.roomSummary.room];
|
||||
|
||||
}];
|
||||
} else if (conversationCellDataArray.count > 0 && (_recentsDataSourceMode == RecentsDataSourceModeRooms || _recentsDataSourceMode == RecentsDataSourceModePeople))
|
||||
{
|
||||
[conversationCellDataArray sortUsingComparator:^NSComparisonResult(id<MXKRecentCellDataStoring> recentCellData1, id<MXKRecentCellDataStoring> recentCellData2) {
|
||||
|
||||
if (recentCellData1.roomSummary.room.sentStatus != MXRoomSentStatusOk
|
||||
&& recentCellData2.roomSummary.room.sentStatus == MXRoomSentStatusOk)
|
||||
{
|
||||
return NSOrderedAscending;
|
||||
}
|
||||
|
||||
if (recentCellData2.roomSummary.room.sentStatus != MXRoomSentStatusOk
|
||||
&& recentCellData1.roomSummary.room.sentStatus == MXRoomSentStatusOk)
|
||||
{
|
||||
return NSOrderedDescending;
|
||||
}
|
||||
|
||||
return NSOrderedAscending;
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user