Emoji picker adjustments
This commit is contained in:
parent
baa2e17aad
commit
6acf829fe2
3 changed files with 27 additions and 9 deletions
|
|
@ -841,14 +841,23 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
});
|
||||
}
|
||||
|
||||
void hideEmojiPicker() {
|
||||
// #Pangea
|
||||
MatrixState.pAnyState.closeAllOverlays();
|
||||
clearSelectedEvents();
|
||||
// Pangea
|
||||
// #Pangea
|
||||
// void hideEmojiPicker() {
|
||||
void hideEmojiPicker({bool closeOverlay = false}) {
|
||||
if (closeOverlay) {
|
||||
MatrixState.pAnyState.closeOverlay();
|
||||
}
|
||||
// Pangea#
|
||||
setState(() => showEmojiPicker = false);
|
||||
}
|
||||
|
||||
// #Pangea
|
||||
void hideOverlayEmojiPicker() {
|
||||
MatrixState.pAnyState.closeOverlay();
|
||||
setState(() => showEmojiPicker = false);
|
||||
}
|
||||
// Pangea
|
||||
|
||||
void emojiPickerAction() {
|
||||
if (showEmojiPicker) {
|
||||
inputFocus.requestFocus();
|
||||
|
|
|
|||
|
|
@ -92,9 +92,16 @@ class ChatEmojiPicker extends StatelessWidget {
|
|||
),
|
||||
// #Pangea
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 14.0, top: 2.0),
|
||||
padding: EdgeInsets.only(
|
||||
bottom: (controller.emojiPickerType ==
|
||||
EmojiPickerType.reaction)
|
||||
? 14.0
|
||||
: 0,
|
||||
top: 2.0,
|
||||
),
|
||||
child: FloatingActionButton(
|
||||
onPressed: controller.hideEmojiPicker,
|
||||
onPressed: () =>
|
||||
controller.hideEmojiPicker(closeOverlay: true),
|
||||
shape: const CircleBorder(),
|
||||
mini: true,
|
||||
child: const Icon(Icons.close),
|
||||
|
|
|
|||
|
|
@ -447,7 +447,7 @@ class ChatView extends StatelessWidget {
|
|||
Positioned(
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 16,
|
||||
bottom: controller.showEmojiPicker ? 0 : 16,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
|
@ -501,7 +501,9 @@ class ChatView extends StatelessWidget {
|
|||
),
|
||||
ReplyDisplay(controller),
|
||||
ChatInputRow(controller),
|
||||
ChatEmojiPicker(controller),
|
||||
if (controller.emojiPickerType !=
|
||||
EmojiPickerType.reaction)
|
||||
ChatEmojiPicker(controller),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue