feat: Add location sharing

This commit is contained in:
Sorunome 2021-08-01 09:53:43 +02:00 committed by Christian Pauly
commit 5d0967ecda
11 changed files with 425 additions and 1 deletions

View file

@ -28,6 +28,7 @@ import 'package:vrouter/vrouter.dart';
import '../utils/localized_exception_extension.dart';
import 'send_file_dialog.dart';
import 'send_location_dialog.dart';
import 'sticker_picker_dialog.dart';
import '../utils/matrix_sdk_extensions.dart/filtered_timeline_extension.dart';
import '../utils/matrix_sdk_extensions.dart/matrix_file_extension.dart';
@ -351,6 +352,14 @@ class ChatController extends State<Chat> {
);
}
void sendLocationAction() async {
await showDialog(
context: context,
useRootNavigator: false,
builder: (c) => SendLocationDialog(room: room),
);
}
String _getSelectedEventString() {
var copyString = '';
if (selectedEvents.length == 1) {
@ -678,6 +687,9 @@ class ChatController extends State<Chat> {
if (choice == 'voice') {
voiceMessageAction();
}
if (choice == 'location') {
sendLocationAction();
}
}
void onInputBarChanged(String text) {