Revert emoji picker close button

pull/1384/head
Kelrap 1 year ago
parent c42f44a798
commit baa2e17aad

@ -40,85 +40,66 @@ class ChatEmojiPicker extends StatelessWidget {
], ],
), ),
Expanded( Expanded(
child: child: TabBarView(
// #Pangea
// Display the button to close the emoji picker
// over the emoji picker
Stack(
children: [ children: [
// Pangea# EmojiPicker(
TabBarView( onEmojiSelected: controller.onEmojiSelected,
children: [ onBackspacePressed: controller.emojiPickerBackspace,
EmojiPicker( config: Config(
onEmojiSelected: controller.onEmojiSelected, emojiViewConfig: EmojiViewConfig(
onBackspacePressed: noRecents: const NoRecent(),
controller.emojiPickerBackspace, backgroundColor: Theme.of(context)
config: Config( .colorScheme
emojiViewConfig: EmojiViewConfig( .onInverseSurface,
noRecents: const NoRecent(),
backgroundColor: Theme.of(context)
.colorScheme
.onInverseSurface,
),
bottomActionBarConfig:
const BottomActionBarConfig(
enabled: false,
),
categoryViewConfig: CategoryViewConfig(
backspaceColor: theme.colorScheme.primary,
iconColor: theme.colorScheme.primary
.withOpacity(0.5),
iconColorSelected:
theme.colorScheme.primary,
indicatorColor: theme.colorScheme.primary,
),
skinToneConfig: SkinToneConfig(
dialogBackgroundColor: Color.lerp(
theme.colorScheme.surface,
theme.colorScheme.primaryContainer,
0.75,
)!,
indicatorColor: theme.colorScheme.onSurface,
),
),
), ),
StickerPickerDialog( bottomActionBarConfig:
room: controller.room, const BottomActionBarConfig(
onSelected: (sticker) { enabled: false,
controller.room.sendEvent( ),
{ categoryViewConfig: CategoryViewConfig(
'body': sticker.body, backspaceColor: theme.colorScheme.primary,
'info': sticker.info ?? {}, iconColor:
'url': sticker.url.toString(), theme.colorScheme.primary.withOpacity(0.5),
}, iconColorSelected: theme.colorScheme.primary,
type: EventTypes.Sticker, indicatorColor: theme.colorScheme.primary,
); ),
controller.hideEmojiPicker(); skinToneConfig: SkinToneConfig(
}, dialogBackgroundColor: Color.lerp(
theme.colorScheme.surface,
theme.colorScheme.primaryContainer,
0.75,
)!,
indicatorColor: theme.colorScheme.onSurface,
), ),
],
),
// #Pangea
Positioned(
bottom: 20,
left: 0,
right: 0,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
FloatingActionButton(
onPressed: controller.hideEmojiPicker,
shape: const CircleBorder(),
mini: true,
child: const Icon(Icons.close),
),
],
), ),
), ),
StickerPickerDialog(
room: controller.room,
onSelected: (sticker) {
controller.room.sendEvent(
{
'body': sticker.body,
'info': sticker.info ?? {},
'url': sticker.url.toString(),
},
type: EventTypes.Sticker,
);
controller.hideEmojiPicker();
},
),
], ],
), ),
), ),
// #Pangea
Padding(
padding: const EdgeInsets.only(bottom: 14.0, top: 2.0),
child: FloatingActionButton(
onPressed: controller.hideEmojiPicker,
shape: const CircleBorder(),
mini: true,
child: const Icon(Icons.close),
),
),
// Pangea# // Pangea#
], ],
), ),

Loading…
Cancel
Save