move open in app to top tiles
This commit is contained in:
+18
-13
@@ -527,6 +527,9 @@ class _PageActionsCard extends HookConsumerWidget {
|
|||||||
|
|
||||||
// Add to Home Screen (conditional)
|
// Add to Home Screen (conditional)
|
||||||
_AddToHomeScreenTile(selectedTabId: selectedTabId),
|
_AddToHomeScreenTile(selectedTabId: selectedTabId),
|
||||||
|
|
||||||
|
// Open in App (conditional)
|
||||||
|
_OpenInAppTile(selectedTabId: selectedTabId),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1339,9 +1342,6 @@ class _ShareExpansion extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
||||||
// Open in App (conditional)
|
|
||||||
_OpenInAppSubTile(selectedTabId: selectedTabId),
|
|
||||||
|
|
||||||
// Share Screenshot
|
// Share Screenshot
|
||||||
_buildSubTile(
|
_buildSubTile(
|
||||||
'Share Screenshot',
|
'Share Screenshot',
|
||||||
@@ -1415,12 +1415,12 @@ class _ShareExpansion extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _OpenInAppSubTile extends HookConsumerWidget {
|
class _OpenInAppTile extends HookConsumerWidget {
|
||||||
final String selectedTabId;
|
final String selectedTabId;
|
||||||
|
|
||||||
static final _service = GeckoAppLinksService();
|
static final _service = GeckoAppLinksService();
|
||||||
|
|
||||||
const _OpenInAppSubTile({required this.selectedTabId});
|
const _OpenInAppTile({required this.selectedTabId});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
@@ -1433,14 +1433,19 @@ class _OpenInAppSubTile extends HookConsumerWidget {
|
|||||||
|
|
||||||
if (hasExternalApp.data != true) return const SizedBox.shrink();
|
if (hasExternalApp.data != true) return const SizedBox.shrink();
|
||||||
|
|
||||||
return _buildSubTile(
|
return Column(
|
||||||
'Open in App',
|
children: [
|
||||||
icon: Icons.open_in_new,
|
_buildDivider(),
|
||||||
onTap: () async {
|
ListTile(
|
||||||
if (url == null) return;
|
leading: const Icon(Icons.open_in_new),
|
||||||
final success = await _service.openAppLink(url);
|
title: const Text('Open in App'),
|
||||||
if (success && context.mounted) Navigator.pop(context);
|
onTap: () async {
|
||||||
},
|
if (url == null) return;
|
||||||
|
final success = await _service.openAppLink(url);
|
||||||
|
if (success && context.mounted) Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user