feat: Set usage of custom emojis and stickers
This commit is contained in:
parent
5a3703ff2d
commit
18d69ae608
3 changed files with 102 additions and 43 deletions
|
|
@ -124,6 +124,15 @@ class EmotesSettingsController extends State<EmotesSettings> {
|
|||
showSave = true;
|
||||
});
|
||||
|
||||
void toggleUsage(String imageCode, ImagePackUsage usage) {
|
||||
setState(() {
|
||||
final usages =
|
||||
pack!.images[imageCode]!.usage ??= List.from(ImagePackUsage.values);
|
||||
if (!usages.remove(usage)) usages.add(usage);
|
||||
showSave = true;
|
||||
});
|
||||
}
|
||||
|
||||
void submitImageAction(
|
||||
String oldImageCode,
|
||||
String imageCode,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue