commented out references to keyboard_shortcuts

pull/1077/head
Gabby Gurdin 2 years ago
parent a2fb362bde
commit ede472e0e8

@ -2,14 +2,11 @@ import 'package:animations/animations.dart';
import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/pangea/choreographer/widgets/it_bar.dart'; import 'package:fluffychat/pangea/choreographer/widgets/it_bar.dart';
import 'package:fluffychat/pangea/choreographer/widgets/send_button.dart'; import 'package:fluffychat/pangea/choreographer/widgets/send_button.dart';
import 'package:fluffychat/pangea/widgets/chat/message_actions.dart';
import 'package:fluffychat/utils/platform_infos.dart'; import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/avatar.dart'; import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/matrix.dart'; import 'package:fluffychat/widgets/matrix.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:keyboard_shortcuts/keyboard_shortcuts.dart';
import 'package:matrix/matrix.dart'; import 'package:matrix/matrix.dart';
import '../../config/themes.dart'; import '../../config/themes.dart';
@ -103,15 +100,18 @@ class ChatInputRow extends StatelessWidget {
: const SizedBox.shrink(), : const SizedBox.shrink(),
] ]
: <Widget>[ : <Widget>[
KeyBoardShortcuts( // #Pangea
keysToPress: { // KeyBoardShortcuts(
LogicalKeyboardKey.altLeft, // keysToPress: {
LogicalKeyboardKey.keyA, // LogicalKeyboardKey.altLeft,
}, // LogicalKeyboardKey.keyA,
onKeysPressed: () => // },
controller.onAddPopupMenuButtonSelected('file'), // onKeysPressed: () =>
helpLabel: L10n.of(context)!.sendFile, // controller.onAddPopupMenuButtonSelected('file'),
child: AnimatedContainer( // helpLabel: L10n.of(context)!.sendFile,
// child:
// Pangea#
AnimatedContainer(
duration: FluffyThemes.animationDuration, duration: FluffyThemes.animationDuration,
curve: FluffyThemes.animationCurve, curve: FluffyThemes.animationCurve,
height: 56, height: 56,
@ -235,18 +235,24 @@ class ChatInputRow extends StatelessWidget {
], ],
), ),
), ),
), // #Pangea
// ),
// Pangea#
Container( Container(
height: 56, height: 56,
alignment: Alignment.center, alignment: Alignment.center,
child: KeyBoardShortcuts( child:
keysToPress: { // #Pangea
LogicalKeyboardKey.altLeft, // KeyBoardShortcuts(
LogicalKeyboardKey.keyE, // keysToPress: {
}, // LogicalKeyboardKey.altLeft,
onKeysPressed: controller.emojiPickerAction, // LogicalKeyboardKey.keyE,
helpLabel: L10n.of(context)!.emojis, // },
child: IconButton( // onKeysPressed: controller.emojiPickerAction,
// helpLabel: L10n.of(context)!.emojis,
// child:
// Pangea#
IconButton(
tooltip: L10n.of(context)!.emojis, tooltip: L10n.of(context)!.emojis,
icon: PageTransitionSwitcher( icon: PageTransitionSwitcher(
transitionBuilder: ( transitionBuilder: (
@ -271,7 +277,9 @@ class ChatInputRow extends StatelessWidget {
), ),
onPressed: controller.emojiPickerAction, onPressed: controller.emojiPickerAction,
), ),
), // #Pangea
// ),
// Pangea#
), ),
// #Pangea // #Pangea
// if (Matrix.of(context).isMultiAccount && // if (Matrix.of(context).isMultiAccount &&

@ -12,7 +12,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:keyboard_shortcuts/keyboard_shortcuts.dart';
import 'package:matrix/matrix.dart'; import 'package:matrix/matrix.dart';
import '../../utils/fluffy_share.dart'; import '../../utils/fluffy_share.dart';
@ -279,38 +278,40 @@ class ClientChooserButton extends StatelessWidget {
builder: (context, snapshot) => Stack( builder: (context, snapshot) => Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
...List.generate( // #Pangea
clientCount, // ...List.generate(
(index) => KeyBoardShortcuts( // clientCount,
keysToPress: _buildKeyboardShortcut(index + 1), // (index) => KeyBoardShortcuts(
helpLabel: L10n.of(context)!.switchToAccount(index + 1), // keysToPress: _buildKeyboardShortcut(index + 1),
onKeysPressed: () => _handleKeyboardShortcut( // helpLabel: L10n.of(context)!.switchToAccount(index + 1),
matrix, // onKeysPressed: () => _handleKeyboardShortcut(
index, // matrix,
context, // index,
), // context,
child: const SizedBox.shrink(), // ),
), // child: const SizedBox.shrink(),
), // ),
KeyBoardShortcuts( // ),
keysToPress: { // KeyBoardShortcuts(
LogicalKeyboardKey.controlLeft, // keysToPress: {
LogicalKeyboardKey.tab, // LogicalKeyboardKey.controlLeft,
}, // LogicalKeyboardKey.tab,
helpLabel: L10n.of(context)!.nextAccount, // },
onKeysPressed: () => _nextAccount(matrix, context), // helpLabel: L10n.of(context)!.nextAccount,
child: const SizedBox.shrink(), // onKeysPressed: () => _nextAccount(matrix, context),
), // child: const SizedBox.shrink(),
KeyBoardShortcuts( // ),
keysToPress: { // KeyBoardShortcuts(
LogicalKeyboardKey.controlLeft, // keysToPress: {
LogicalKeyboardKey.shiftLeft, // LogicalKeyboardKey.controlLeft,
LogicalKeyboardKey.tab, // LogicalKeyboardKey.shiftLeft,
}, // LogicalKeyboardKey.tab,
helpLabel: L10n.of(context)!.previousAccount, // },
onKeysPressed: () => _previousAccount(matrix, context), // helpLabel: L10n.of(context)!.previousAccount,
child: const SizedBox.shrink(), // onKeysPressed: () => _previousAccount(matrix, context),
), // child: const SizedBox.shrink(),
// ),
// Pangea#
PopupMenuButton<Object>( PopupMenuButton<Object>(
onSelected: (o) => _clientSelected(o, context), onSelected: (o) => _clientSelected(o, context),
itemBuilder: _bundleMenuItems, itemBuilder: _bundleMenuItems,

@ -6,11 +6,9 @@ import 'package:fluffychat/pangea/extensions/pangea_room_extension.dart';
import 'package:fluffychat/pangea/models/class_model.dart'; import 'package:fluffychat/pangea/models/class_model.dart';
import 'package:fluffychat/pangea/utils/download_chat.dart'; import 'package:fluffychat/pangea/utils/download_chat.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:future_loading_dialog/future_loading_dialog.dart'; import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:keyboard_shortcuts/keyboard_shortcuts.dart';
import 'package:matrix/matrix.dart'; import 'package:matrix/matrix.dart';
import 'matrix.dart'; import 'matrix.dart';
@ -152,15 +150,17 @@ class ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
return Stack( return Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
KeyBoardShortcuts( // #Pangea
keysToPress: { // KeyBoardShortcuts(
LogicalKeyboardKey.controlLeft, // keysToPress: {
LogicalKeyboardKey.keyI, // LogicalKeyboardKey.controlLeft,
}, // LogicalKeyboardKey.keyI,
helpLabel: L10n.of(context)!.chatDetails, // },
onKeysPressed: _showChatDetails, // helpLabel: L10n.of(context)!.chatDetails,
child: const SizedBox.shrink(), // onKeysPressed: _showChatDetails,
), // child: const SizedBox.shrink(),
// ),
// Pangea#
PopupMenuButton( PopupMenuButton(
onSelected: (String choice) async { onSelected: (String choice) async {
switch (choice) { switch (choice) {

Loading…
Cancel
Save