feat: uncomment sendOnEnter chat setting (#1388)
This commit is contained in:
parent
9826501c86
commit
a26895ad81
4 changed files with 15 additions and 19 deletions
|
|
@ -105,10 +105,7 @@ abstract class AppConfig {
|
|||
static bool sendTypingNotifications = true;
|
||||
static bool sendPublicReadReceipts = true;
|
||||
static bool swipeRightToLeftToReply = true;
|
||||
//#Pangea
|
||||
static bool sendOnEnter = true;
|
||||
// static bool sendOnEnter = false;
|
||||
//Pangea#
|
||||
static bool? sendOnEnter;
|
||||
static bool showPresences = true;
|
||||
static bool experimentalVoip = false;
|
||||
static const bool hideTypingUsernames = false;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ 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';
|
||||
import 'package:fluffychat/pangea/choreographer/widgets/send_button.dart';
|
||||
import 'package:fluffychat/pangea/choreographer/widgets/start_igc_button.dart';
|
||||
import 'package:fluffychat/pangea/constants/language_constants.dart';
|
||||
|
|
@ -336,12 +337,11 @@ class ChatInputRow extends StatelessWidget {
|
|||
maxLines: 8,
|
||||
autofocus: !PlatformInfos.isMobile,
|
||||
keyboardType: TextInputType.multiline,
|
||||
textInputAction: AppConfig.sendOnEnter == true &&
|
||||
PlatformInfos.isMobile
|
||||
? TextInputAction.send
|
||||
: null,
|
||||
// #Pangea
|
||||
// textInputAction: AppConfig.sendOnEnter == true &&
|
||||
// PlatformInfos.isMobile
|
||||
// ? TextInputAction.send
|
||||
// : null,
|
||||
textInputAction: TextInputAction.send,
|
||||
// onSubmitted: controller.onInputBarSubmitted,
|
||||
onSubmitted: (String value) =>
|
||||
controller.onInputBarSubmitted(value, context),
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import 'package:fluffychat/config/app_config.dart';
|
|||
import 'package:fluffychat/pages/chat/command_hints.dart';
|
||||
import 'package:fluffychat/pangea/widgets/igc/pangea_text_controller.dart';
|
||||
import 'package:fluffychat/utils/markdown_context_builder.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
import 'package:fluffychat/widgets/avatar.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
import 'package:fluffychat/widgets/mxc_image.dart';
|
||||
|
|
@ -413,10 +414,7 @@ class InputBar extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// #Pangea
|
||||
// final useShortCuts = (AppConfig.sendOnEnter ?? !PlatformInfos.isMobile);
|
||||
final useShortCuts = AppConfig.sendOnEnter;
|
||||
// Pangea#
|
||||
final useShortCuts = (AppConfig.sendOnEnter ?? !PlatformInfos.isMobile);
|
||||
return Shortcuts(
|
||||
shortcuts: !useShortCuts
|
||||
? {}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
|
|||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/setting_keys.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
|
||||
import 'package:fluffychat/widgets/settings_switch_list_tile.dart';
|
||||
import 'settings_chat.dart';
|
||||
|
|
@ -60,13 +61,13 @@ class SettingsChatView extends StatelessWidget {
|
|||
// storeKey: SettingKeys.autoplayImages,
|
||||
// defaultValue: AppConfig.autoplayImages,
|
||||
// ),
|
||||
// SettingsSwitchListTile.adaptive(
|
||||
// title: L10n.of(context).sendOnEnter,
|
||||
// onChanged: (b) => AppConfig.sendOnEnter = b,
|
||||
// storeKey: SettingKeys.sendOnEnter,
|
||||
// defaultValue: AppConfig.sendOnEnter ?? !PlatformInfos.isMobile,
|
||||
// ),
|
||||
// Pangea#
|
||||
SettingsSwitchListTile.adaptive(
|
||||
title: L10n.of(context).sendOnEnter,
|
||||
onChanged: (b) => AppConfig.sendOnEnter = b,
|
||||
storeKey: SettingKeys.sendOnEnter,
|
||||
defaultValue: AppConfig.sendOnEnter ?? !PlatformInfos.isMobile,
|
||||
),
|
||||
SettingsSwitchListTile.adaptive(
|
||||
title: L10n.of(context).swipeRightToLeftToReply,
|
||||
onChanged: (b) => AppConfig.swipeRightToLeftToReply = b,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue