added support for desktop mode
This commit is contained in:
@@ -34,7 +34,7 @@ final class EngineBoundIntentStreamProvider
|
||||
}
|
||||
|
||||
String _$engineBoundIntentStreamHash() =>
|
||||
r'fa7c3e0277b25e8129a12feaadf39db6b65a1cd5';
|
||||
r'ab9804f97e0222b2306683d2fcfa71d3d57ecd21';
|
||||
|
||||
abstract class _$EngineBoundIntentStream
|
||||
extends $StreamNotifier<SharedContent> {
|
||||
|
||||
+32
@@ -29,6 +29,7 @@ import 'package:weblibre/core/providers/defaults.dart';
|
||||
import 'package:weblibre/core/routing/routes.dart';
|
||||
import 'package:weblibre/features/geckoview/domain/controllers/bottom_sheet.dart';
|
||||
import 'package:weblibre/features/geckoview/domain/providers.dart';
|
||||
import 'package:weblibre/features/geckoview/domain/providers/desktop_mode.dart';
|
||||
import 'package:weblibre/features/geckoview/domain/providers/selected_tab.dart';
|
||||
import 'package:weblibre/features/geckoview/domain/providers/tab_session.dart';
|
||||
import 'package:weblibre/features/geckoview/domain/providers/tab_state.dart';
|
||||
@@ -410,6 +411,37 @@ class BrowserBottomAppBar extends HookConsumerWidget {
|
||||
leadingIcon: const Icon(Icons.search),
|
||||
child: const Text('Find in page'),
|
||||
),
|
||||
if (selectedTabId != null)
|
||||
Consumer(
|
||||
builder: (context, childRef, child) {
|
||||
final enabled = childRef.watch(
|
||||
desktopModeProvider(selectedTabId),
|
||||
);
|
||||
|
||||
return MenuItemButton(
|
||||
onPressed: () {
|
||||
ref
|
||||
.read(desktopModeProvider(selectedTabId).notifier)
|
||||
.toggle();
|
||||
},
|
||||
leadingIcon: const Icon(MdiIcons.monitor),
|
||||
trailingIcon: Checkbox(
|
||||
value: enabled,
|
||||
onChanged: (value) {
|
||||
if (value != null) {
|
||||
ref
|
||||
.read(
|
||||
desktopModeProvider(selectedTabId).notifier,
|
||||
)
|
||||
.enabled(value);
|
||||
trippleDotMenuController.close();
|
||||
}
|
||||
},
|
||||
),
|
||||
child: const Text('Desktop Mode'),
|
||||
);
|
||||
},
|
||||
),
|
||||
if (selectedTabId != null) const Divider(),
|
||||
if (selectedTabId != null)
|
||||
MenuItemButton(
|
||||
|
||||
Reference in New Issue
Block a user