chore: Move emote settings button to chat popup menu

This commit is contained in:
Christian Kußowski 2025-09-25 14:47:42 +02:00
commit 524a63e1d6
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
4 changed files with 130 additions and 32 deletions

View file

@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:collection/collection.dart';
import 'package:go_router/go_router.dart';
import 'package:image_picker/image_picker.dart';
import 'package:matrix/matrix.dart';
@ -91,20 +90,6 @@ class ChatDetailsController extends State<ChatDetails> {
}
}
void goToEmoteSettings() async {
final room = Matrix.of(context).client.getRoomById(roomId!)!;
// okay, we need to test if there are any emote state events other than the default one
// if so, we need to be directed to a selection screen for which pack we want to look at
// otherwise, we just open the normal one.
if ((room.states['im.ponies.room_emotes'] ?? <String, Event>{})
.keys
.any((String s) => s.isNotEmpty)) {
context.push('/rooms/${room.id}/details/multiple_emotes');
} else {
context.push('/rooms/${room.id}/details/emotes');
}
}
void setAvatarAction() async {
final room = Matrix.of(context).client.getRoomById(roomId!);
final actions = [