diff --git a/lib/controllers/settings_sections.dart b/lib/controllers/settings_sections.dart index 665ecb1..9a437d8 100644 --- a/lib/controllers/settings_sections.dart +++ b/lib/controllers/settings_sections.dart @@ -177,7 +177,7 @@ class SettingsSectionsController ), .new( title: "Linux Mobile Mode", - description: "Enables some fixes for Linux mobile, e.g. disabling dragging appbar for moving window, and swiping drawers open.", + description: "Enables some fixes for Linux mobile, e.g. disabling dragging appbar for moving window.", icon: Icons.construction, builder: (title, description, icon) => SwitchListTile( title: Text(title), diff --git a/lib/main.dart b/lib/main.dart index 59fa974..94469cc 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -111,21 +111,10 @@ class const App({super.key}) extends StatelessWidget { @override Widget build(BuildContext context) => DynamicColorBuilder( builder: (lightDynamic, darkDynamic) => Consumer( - builder: (context, ref, child) { - // Flutter turns off mobile behaviour like swiping drawers open on desktop platforms, so Linux mobile pretends to be Android - ThemeData forPlatform(ThemeData theme) => - ref.watch( - SettingsController.provider.select( - (settings) => settings.value?.linuxMobileMode ?? false, - ), - ) - ? theme.copyWith(platform: .android) - : theme; - - return MaterialApp( - navigatorKey: navigatorKey, - debugShowCheckedModeBanner: false, - theme: forPlatform( + builder: (context, ref, child) => MaterialApp( + navigatorKey: navigatorKey, + debugShowCheckedModeBanner: false, + theme: (ref .watch(SettingsController.provider) .maybeWhen( @@ -135,8 +124,7 @@ class const App({super.key}) extends StatelessWidget { ) ?? ThemeData.light().colorScheme) .theme, - ), - darkTheme: forPlatform( + darkTheme: (ref .watch(SettingsController.provider) .maybeWhen( @@ -146,16 +134,14 @@ class const App({super.key}) extends StatelessWidget { ) ?? ThemeData.dark().colorScheme) .theme, - ), - themeMode: ref - .watch(SettingsController.provider) - .maybeWhen( - data: (settings) => settings.theme, - orElse: () => ThemeMode.system, - ), - home: child, - ); - }, + themeMode: ref + .watch(SettingsController.provider) + .maybeWhen( + data: (settings) => settings.theme, + orElse: () => ThemeMode.system, + ), + home: child, + ), child: DefaultTextHeightBehavior( textHeightBehavior: .new(leadingDistribution: .even), child: Scaffold( diff --git a/lib/widgets/room_chat/room_chat.dart b/lib/widgets/room_chat/room_chat.dart index e7fd6e0..dd231f2 100644 --- a/lib/widgets/room_chat/room_chat.dart +++ b/lib/widgets/room_chat/room_chat.dart @@ -202,7 +202,6 @@ final class const RoomChat({ ); return Scaffold( - endDrawerEnableOpenDragGesture: false, endDrawer: SearchDrawer( roomId, getEventOptions: getEventOptions, @@ -210,7 +209,6 @@ final class const RoomChat({ ), body: Builder( builder: (searchContext) => Scaffold( - endDrawerEnableOpenDragGesture: false, endDrawer: PinnedEventsDrawer( roomId, getEventOptions: getEventOptions,