feat: move reply button to chat view header (#1733)
This commit is contained in:
parent
65149bb1fa
commit
ad241aa631
3 changed files with 45 additions and 48 deletions
|
|
@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
|
|||
|
||||
import 'package:animations/animations.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
|
|
@ -111,7 +110,7 @@ class ChatInputRow extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
// #Pangea
|
||||
// else
|
||||
// SizedBox(
|
||||
|
|
@ -126,52 +125,41 @@ class ChatInputRow extends StatelessWidget {
|
|||
// ),
|
||||
// ),
|
||||
// ),
|
||||
else
|
||||
// Pangea#
|
||||
controller.selectedEvents.length == 1
|
||||
?
|
||||
// #Pangea
|
||||
// controller.selectedEvents.first
|
||||
// .getDisplayEvent(controller.timeline!)
|
||||
// .status
|
||||
// .isSent
|
||||
// ?
|
||||
// Pangea#
|
||||
SizedBox(
|
||||
height: height,
|
||||
child: TextButton(
|
||||
onPressed: controller.replyAction,
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
// #Pangea
|
||||
// Text(L10n.of(context).reply),
|
||||
// const Icon(Icons.keyboard_arrow_right),
|
||||
const Icon(Symbols.reply),
|
||||
const SizedBox(width: 6),
|
||||
Text(L10n.of(context).reply),
|
||||
// Pangea#
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
// #Pangea
|
||||
// : SizedBox(
|
||||
// height: height,
|
||||
// child: TextButton(
|
||||
// onPressed: controller.sendAgainAction,
|
||||
// child: Row(
|
||||
// children: <Widget>[
|
||||
// Text(L10n.of(context).tryToSendAgain),
|
||||
// const SizedBox(width: 4),
|
||||
// const Icon(Icons.send_outlined, size: 16),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Pangea#
|
||||
: const SizedBox.shrink(),
|
||||
// #Pangea
|
||||
PangeaReactionsPicker(controller, overlayController),
|
||||
// controller.selectedEvents.length == 1
|
||||
// ? controller.selectedEvents.first
|
||||
// .getDisplayEvent(controller.timeline!)
|
||||
// .status
|
||||
// .isSent
|
||||
// ? SizedBox(
|
||||
// height: height,
|
||||
// child: TextButton(
|
||||
// onPressed: controller.replyAction,
|
||||
// child: Row(
|
||||
// children: <Widget>[
|
||||
// Text(L10n.of(context).reply),
|
||||
// const Icon(Icons.keyboard_arrow_right),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// : SizedBox(
|
||||
// height: height,
|
||||
// child: TextButton(
|
||||
// onPressed: controller.sendAgainAction,
|
||||
// child: Row(
|
||||
// children: <Widget>[
|
||||
// Text(L10n.of(context).tryToSendAgain),
|
||||
// const SizedBox(width: 4),
|
||||
// const Icon(Icons.send_outlined, size: 16),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// : const SizedBox.shrink(),
|
||||
PangeaReactionsPicker(
|
||||
controller,
|
||||
overlayController,
|
||||
),
|
||||
if (controller.selectedEvents.length == 1 &&
|
||||
!controller.selectedEvents.first
|
||||
.getDisplayEvent(controller.timeline!)
|
||||
|
|
|
|||
|
|
@ -33,6 +33,13 @@ class OverlayHeader extends StatelessWidget {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
if (controller.selectedEvents.length == 1)
|
||||
IconButton(
|
||||
icon: const Icon(Symbols.reply_all),
|
||||
tooltip: L10n.of(context).reply,
|
||||
onPressed: controller.replyAction,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Symbols.forward),
|
||||
tooltip: L10n.of(context).forward,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
|||
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/app_emojis.dart';
|
||||
import 'package:fluffychat/pages/chat/chat.dart';
|
||||
import 'package:fluffychat/pangea/events/models/pangea_token_model.dart';
|
||||
|
|
@ -71,6 +72,7 @@ class PangeaReactionsPicker extends StatelessWidget {
|
|||
onTap: () => controller.sendEmojiAction(emoji),
|
||||
child: Container(
|
||||
width: kIsWeb ? 56 : 48,
|
||||
height: AppConfig.defaultFooterHeight,
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
emoji,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue