chore: Improve room custom emote UX

This commit is contained in:
krille-chan 2025-11-20 18:57:12 +01:00
commit 2b4381dd07
No known key found for this signature in database

View file

@ -61,10 +61,11 @@ class EmotesSettingsView extends StatelessWidget {
value: PopupMenuEmojiActions.import, value: PopupMenuEmojiActions.import,
child: Text(L10n.of(context).importFromZipFile), child: Text(L10n.of(context).importFromZipFile),
), ),
PopupMenuItem( if (imageKeys.isNotEmpty)
value: PopupMenuEmojiActions.export, PopupMenuItem(
child: Text(L10n.of(context).exportEmotePack), value: PopupMenuEmojiActions.export,
), child: Text(L10n.of(context).exportEmotePack),
),
], ],
), ),
], ],
@ -83,14 +84,14 @@ class EmotesSettingsView extends StatelessWidget {
label: Text(L10n.of(context).createSticker), label: Text(L10n.of(context).createSticker),
), ),
), ),
if (controller.room != null) if (!controller.readonly || controller.room != null)
const Divider(),
if (controller.room != null && imageKeys.isNotEmpty)
SwitchListTile.adaptive( SwitchListTile.adaptive(
title: Text(L10n.of(context).enableEmotesGlobally), title: Text(L10n.of(context).enableEmotesGlobally),
value: controller.isGloballyActive(client), value: controller.isGloballyActive(client),
onChanged: controller.setIsGloballyActive, onChanged: controller.setIsGloballyActive,
), ),
if (!controller.readonly || controller.room != null)
const Divider(),
imageKeys.isEmpty imageKeys.isEmpty
? Center( ? Center(
child: Padding( child: Padding(