feat: add option to configure reply swipe direction

This commit is contained in:
MrSpoony 2024-06-04 00:31:37 +02:00
commit 3f81dc5187
No known key found for this signature in database
6 changed files with 18 additions and 1 deletions

View file

@ -515,7 +515,9 @@ class Message extends StatelessWidget {
child: Icon(Icons.check_outlined),
),
),
direction: SwipeDirection.endToStart,
direction: AppConfig.swipeRightToLeftToReply
? SwipeDirection.endToStart
: SwipeDirection.startToEnd,
onSwipe: (_) => onSwipe(),
child: Container(
constraints: const BoxConstraints(

View file

@ -65,6 +65,12 @@ class SettingsChatView extends StatelessWidget {
storeKey: SettingKeys.sendOnEnter,
defaultValue: AppConfig.sendOnEnter ?? !PlatformInfos.isMobile,
),
SettingsSwitchListTile.adaptive(
title: L10n.of(context)!.swipeRightToLeftToReply,
onChanged: (b) => AppConfig.swipeRightToLeftToReply = b,
storeKey: SettingKeys.swipeRightToLeftToReply,
defaultValue: AppConfig.swipeRightToLeftToReply,
),
Divider(
height: 1,
color: Theme.of(context).dividerColor,