mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-02 14:16:59 +02:00
Messages - Room notification modes.
The web client defines 4 levels of notifications: 'All messages (loud)', 'All messages', 'Mentions only' and 'Mute'. The ios client support only 2 modes: Mute / Unmute. We update the client to map these 2 modes with the 4 new ones until a new design is defined to handle the 4 levels on mobile client: - When a room is in 'Mute' or 'Mentions only mode', it is displayed as mute. Else it is unmute. - When the user unmute a room, the room switches in 'All message mode'. - When the user mute a room, the room switches in 'Mentions only' mode. On ios client, mute a room
This commit is contained in:
@@ -407,7 +407,7 @@
|
||||
NSString* title = @" ";
|
||||
|
||||
// Notification toggle
|
||||
BOOL isMuted = room.isMute;
|
||||
BOOL isMuted = room.isMute || room.isMentionsOnly;
|
||||
|
||||
UITableViewRowAction *muteAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:title handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
|
||||
|
||||
@@ -593,14 +593,28 @@
|
||||
{
|
||||
[self startActivityIndicator];
|
||||
|
||||
[room setMute:mute completion:^{
|
||||
|
||||
[self stopActivityIndicator];
|
||||
|
||||
// Leave editing mode
|
||||
[self setEditing:NO];
|
||||
|
||||
}];
|
||||
if (mute)
|
||||
{
|
||||
[room mentionsOnly:^{
|
||||
|
||||
[self stopActivityIndicator];
|
||||
|
||||
// Leave editing mode
|
||||
[self setEditing:NO];
|
||||
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
[room allMessages:^{
|
||||
|
||||
[self stopActivityIndicator];
|
||||
|
||||
// Leave editing mode
|
||||
[self setEditing:NO];
|
||||
|
||||
}];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user