add m.location support
Needs cross-platform testing. Currently only tested on Android.
This commit is contained in:
parent
979068fc3a
commit
3a8d977f11
2 changed files with 810 additions and 12 deletions
|
|
@ -173,7 +173,9 @@ extension BuildEventOptions on Event {
|
|||
),
|
||||
),
|
||||
|
||||
if (content is MessageContent && sender == userId)
|
||||
if (content is MessageContent &&
|
||||
content is! LocationMessageContent &&
|
||||
sender == userId)
|
||||
PopupMenuItem(
|
||||
onTap: () => onRelation(rowId, .edit),
|
||||
child: const ListTile(leading: Icon(Icons.edit), title: Text("Edit")),
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@ import "package:nexus/helpers/extensions/is_desktop.dart";
|
|||
extension ShowAdaptiveSheet on BuildContext {
|
||||
/// Shows the widget from [builder] in a dialog on desktop, or a bottom sheet
|
||||
/// on mobile. Use the context passed to [builder] to close it.
|
||||
Future<T?> showAdaptiveSheet<T>(WidgetBuilder builder) => isDesktop
|
||||
Future<T?> showAdaptiveSheet<T>(
|
||||
WidgetBuilder builder, {
|
||||
bool enableDrag = true,
|
||||
}) => isDesktop
|
||||
? showDialog<T>(
|
||||
context: this,
|
||||
builder: (context) => Dialog(
|
||||
|
|
@ -18,6 +21,7 @@ extension ShowAdaptiveSheet on BuildContext {
|
|||
: showModalBottomSheet<T>(
|
||||
context: this,
|
||||
isScrollControlled: true,
|
||||
enableDrag: enableDrag,
|
||||
constraints: .new(maxHeight: MediaQuery.sizeOf(this).height - 80),
|
||||
builder: (context) => SafeArea(child: builder(context)),
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue