fix: State problem when not changing emote name

This commit is contained in:
krille-chan 2025-11-20 19:24:15 +01:00
commit b625249ff8
No known key found for this signature in database
2 changed files with 2 additions and 3 deletions

View file

@ -135,11 +135,12 @@ class EmotesSettingsController extends State<EmotesSettings> {
void submitImageAction(
String oldImageCode,
String imageCode,
ImagePackImageContent image,
TextEditingController controller,
) {
controller.text = controller.text.trim().replaceAll(' ', '-');
final imageCode = controller.text;
if (imageCode == oldImageCode) return;
if (pack!.images.keys.any((k) => k == imageCode && k != oldImageCode)) {
controller.text = oldImageCode;
showOkAlertDialog(