Skip to content

Commit

Permalink
TW-1306 remove back button in draft chat
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangdat committed Jan 15, 2024
1 parent b9ea643 commit 0b85ed6
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions lib/pages/chat_draft/draft_chat_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:animations/animations.dart';
import 'package:desktop_drop/desktop_drop.dart';
import 'package:emoji_picker_flutter/emoji_picker_flutter.dart';
import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/di/global/get_it_initializer.dart';
import 'package:fluffychat/pages/chat/chat.dart';
import 'package:fluffychat/pages/chat/chat_app_bar_title_style.dart';
import 'package:fluffychat/pages/chat/chat_input_row_style.dart';
Expand All @@ -11,6 +12,7 @@ import 'package:fluffychat/pages/chat_draft/draft_chat_empty_view.dart';
import 'package:fluffychat/pages/chat_draft/draft_chat_view_style.dart';
import 'package:fluffychat/resource/image_paths.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/utils/responsive/responsive_utils.dart';
import 'package:fluffychat/utils/string_extension.dart';
import 'package:fluffychat/widgets/avatar/avatar.dart';
import 'package:fluffychat/widgets/matrix.dart';
Expand All @@ -33,6 +35,7 @@ class DraftChatView extends StatelessWidget {

@override
Widget build(BuildContext context) {
final responsive = getIt.get<ResponsiveUtils>();
if (controller.showEmojiPicker == true &&
controller.emojiPickerType == EmojiPickerType.reaction) {
return Container();
Expand All @@ -53,16 +56,18 @@ class DraftChatView extends StatelessWidget {
automaticallyImplyLeading: false,
title: Row(
children: [
TwakeIconButton(
splashColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
tooltip: L10n.of(context)!.back,
icon: Icons.arrow_back,
onTap: () => context.pop(),
paddingAll: 8.0,
margin: const EdgeInsets.symmetric(vertical: 12.0),
),
responsive.isMobile(context)
? TwakeIconButton(
splashColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
tooltip: L10n.of(context)!.back,
icon: Icons.arrow_back,
onTap: () => context.pop(),
paddingAll: 8.0,
margin: const EdgeInsets.symmetric(vertical: 12.0),
)
: const SizedBox.shrink(),
Expanded(
child: _EmptyChatTitle(
receiverId: controller.presentationContact!.matrixId!,
Expand Down

0 comments on commit 0b85ed6

Please sign in to comment.