feat: menu de contexto em bottom sheet, painel de anexos, perfil e feed do mural
- Salas (chat, canais, murais e salas de espacos) abrem bottom sheet com grid de acoes - Botao + da barra de digitacao abre painel de anexos em grid de 3 colunas que empurra a caixa de texto - Modal do perfil permite editar nome/status e ler QR code (mobile) - Alterar status atualiza localmente via extensao do SDK matrix - Mural pre-carrega historico para exibir todas as midias em dispositivos sem cache
This commit is contained in:
@@ -204,6 +204,8 @@ class ChatController extends State<ChatPageWithRoom>
|
||||
|
||||
bool showEmojiPicker = false;
|
||||
|
||||
bool showAttachmentPicker = false;
|
||||
|
||||
String? get threadLastEventId {
|
||||
final threadId = activeThreadId;
|
||||
if (threadId == null) return null;
|
||||
@@ -978,18 +980,40 @@ class ChatController extends State<ChatPageWithRoom>
|
||||
setState(() => showEmojiPicker = false);
|
||||
}
|
||||
|
||||
void hideAttachmentPicker() {
|
||||
setState(() => showAttachmentPicker = false);
|
||||
}
|
||||
|
||||
void emojiPickerAction() {
|
||||
if (showEmojiPicker) {
|
||||
inputFocus.requestFocus();
|
||||
} else {
|
||||
inputFocus.unfocus();
|
||||
}
|
||||
setState(() => showEmojiPicker = !showEmojiPicker);
|
||||
setState(() {
|
||||
showEmojiPicker = !showEmojiPicker;
|
||||
showAttachmentPicker = false;
|
||||
});
|
||||
}
|
||||
|
||||
void attachmentPickerAction() {
|
||||
if (showAttachmentPicker) {
|
||||
inputFocus.requestFocus();
|
||||
} else {
|
||||
inputFocus.unfocus();
|
||||
}
|
||||
setState(() {
|
||||
showAttachmentPicker = !showAttachmentPicker;
|
||||
showEmojiPicker = false;
|
||||
});
|
||||
}
|
||||
|
||||
void _inputFocusListener() {
|
||||
if (showEmojiPicker && inputFocus.hasFocus) {
|
||||
setState(() => showEmojiPicker = false);
|
||||
if ((showEmojiPicker || showAttachmentPicker) && inputFocus.hasFocus) {
|
||||
setState(() {
|
||||
showEmojiPicker = false;
|
||||
showAttachmentPicker = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1016,6 +1040,7 @@ class ChatController extends State<ChatPageWithRoom>
|
||||
Clipboard.setData(ClipboardData(text: _getSelectedEventString()));
|
||||
setState(() {
|
||||
showEmojiPicker = false;
|
||||
showAttachmentPicker = false;
|
||||
selectedEvents.clear();
|
||||
});
|
||||
}
|
||||
@@ -1044,6 +1069,7 @@ class ChatController extends State<ChatPageWithRoom>
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
showEmojiPicker = false;
|
||||
showAttachmentPicker = false;
|
||||
selectedEvents.clear();
|
||||
});
|
||||
scaffoldMessenger.showSnackBar(
|
||||
@@ -1120,6 +1146,7 @@ class ChatController extends State<ChatPageWithRoom>
|
||||
);
|
||||
setState(() {
|
||||
showEmojiPicker = false;
|
||||
showAttachmentPicker = false;
|
||||
selectedEvents.clear();
|
||||
});
|
||||
}
|
||||
@@ -1305,6 +1332,7 @@ class ChatController extends State<ChatPageWithRoom>
|
||||
void clearSelectedEvents() => setState(() {
|
||||
selectedEvents.clear();
|
||||
showEmojiPicker = false;
|
||||
showAttachmentPicker = false;
|
||||
});
|
||||
|
||||
void clearSingleSelectedEvent() {
|
||||
|
||||
Reference in New Issue
Block a user