Merge pull request #2655 from krille-chan/krille/add-mute-notification-action
feat: Add mute notification action
This commit is contained in:
commit
993e12a946
3 changed files with 13 additions and 2 deletions
|
|
@ -2776,5 +2776,9 @@
|
|||
"removeAdminRights": "Remove admin rights",
|
||||
"powerLevel": "Power level",
|
||||
"setPowerLevelDescription": "Power levels define what a member is allowed to do in this room and usually range between 0 and 100.",
|
||||
"owner": "Owner"
|
||||
"owner": "Owner",
|
||||
"mute": "Mute",
|
||||
"@mute": {
|
||||
"description": "This should be a very short string because there is not much space in the button!"
|
||||
}
|
||||
}
|
||||
|
|
@ -174,8 +174,10 @@ Future<void> notificationTap(
|
|||
parseCommands: false,
|
||||
displayPendingEvent: false,
|
||||
);
|
||||
case FluffyChatNotificationActions.mute:
|
||||
await room.setPushRuleState(PushRuleState.mentionsOnly);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum FluffyChatNotificationActions { markAsRead, reply }
|
||||
enum FluffyChatNotificationActions { markAsRead, reply, mute }
|
||||
|
|
|
|||
|
|
@ -272,6 +272,11 @@ Future<void> _tryPushHelper(
|
|||
l10n.markAsRead,
|
||||
semanticAction: SemanticAction.markAsRead,
|
||||
),
|
||||
AndroidNotificationAction(
|
||||
FluffyChatNotificationActions.mute.name,
|
||||
l10n.mute,
|
||||
semanticAction: SemanticAction.mute,
|
||||
),
|
||||
],
|
||||
);
|
||||
const iOSPlatformChannelSpecifics = DarwinNotificationDetails();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue