Allow adding chats on phones and keep their native detail route
This commit is contained in:
@@ -9,13 +9,14 @@ Future<void> showChatPanePicker(
|
||||
required List<({String id, String title})> panes,
|
||||
required String? activeId,
|
||||
required ValueChanged<String> onSelected,
|
||||
String title = 'Open chats',
|
||||
}) async {
|
||||
final String? selected;
|
||||
if (chatControlsStyleOf(context) == ChatControlsStyle.cupertino) {
|
||||
selected = await showCupertinoModalPopup<String>(
|
||||
context: context,
|
||||
builder: (context) => CupertinoActionSheet(
|
||||
title: const Text('Open chats'),
|
||||
title: Text(title),
|
||||
actions: [
|
||||
for (final pane in panes)
|
||||
CupertinoActionSheetAction(
|
||||
@@ -34,7 +35,7 @@ Future<void> showChatPanePicker(
|
||||
selected = await showDialog<String>(
|
||||
context: context,
|
||||
builder: (context) => SimpleDialog(
|
||||
title: const Text('Open chats'),
|
||||
title: Text(title),
|
||||
children: [
|
||||
for (final pane in panes)
|
||||
SimpleDialogOption(
|
||||
|
||||
Reference in New Issue
Block a user