fix: Video calls
This commit is contained in:
parent
d473a3e978
commit
6a0c71ef4a
4 changed files with 25 additions and 29 deletions
|
|
@ -5,9 +5,7 @@ import 'package:adaptive_page_layout/adaptive_page_layout.dart';
|
|||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../app_config.dart';
|
||||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'matrix.dart';
|
||||
|
||||
|
|
@ -30,19 +28,6 @@ class _ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
|
|||
super.dispose();
|
||||
}
|
||||
|
||||
void startCallAction(BuildContext context) async {
|
||||
final url =
|
||||
'${AppConfig.jitsiInstance}${Uri.encodeComponent(widget.room.id.localpart)}';
|
||||
final success = await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => widget.room.sendEvent({
|
||||
'msgtype': Matrix.callNamespace,
|
||||
'body': url,
|
||||
}));
|
||||
if (success.error != null) return;
|
||||
await launch(url);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
notificationChangeSub ??= Matrix.of(context)
|
||||
|
|
@ -110,9 +95,6 @@ class _ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
|
|||
future: () =>
|
||||
widget.room.setPushRuleState(PushRuleState.notify));
|
||||
break;
|
||||
case 'call':
|
||||
startCallAction(context);
|
||||
break;
|
||||
case 'details':
|
||||
if (AdaptivePageLayout.of(context).viewDataStack.length < 3) {
|
||||
await AdaptivePageLayout.of(context)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue