refactor: Remove deprecated jitsi call generator
This commit is contained in:
parent
6d96c694b9
commit
9c36a52308
13 changed files with 1 additions and 132 deletions
|
|
@ -16,10 +16,8 @@ import 'package:image_picker/image_picker.dart';
|
|||
import 'package:matrix/matrix.dart';
|
||||
import 'package:record/record.dart';
|
||||
import 'package:scroll_to_index/scroll_to_index.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:vrouter/vrouter.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pages/chat/chat_view.dart';
|
||||
import 'package:fluffychat/pages/chat/cupertino_widgets_bottom_sheet.dart';
|
||||
import 'package:fluffychat/pages/chat/event_info_dialog.dart';
|
||||
|
|
@ -128,20 +126,6 @@ class ChatController extends State<Chat> {
|
|||
|
||||
EmojiPickerType emojiPickerType = EmojiPickerType.keyboard;
|
||||
|
||||
void startCallAction() async {
|
||||
final url =
|
||||
'${AppConfig.jitsiInstance}${Uri.encodeComponent(Matrix.of(context).client.generateUniqueTransactionId())}';
|
||||
|
||||
final success = await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => room!.sendEvent({
|
||||
'msgtype': Matrix.callNamespace,
|
||||
'body': url,
|
||||
}));
|
||||
if (success.error != null) return;
|
||||
await launch(url);
|
||||
}
|
||||
|
||||
void requestHistory() async {
|
||||
if (canLoadMore) {
|
||||
try {
|
||||
|
|
@ -878,9 +862,6 @@ class ChatController extends State<Chat> {
|
|||
if (choice == 'location') {
|
||||
sendLocationAction();
|
||||
}
|
||||
if (choice == 'videocall') {
|
||||
startCallAction();
|
||||
}
|
||||
}
|
||||
|
||||
unpinEvent(String eventId) async {
|
||||
|
|
|
|||
|
|
@ -84,18 +84,6 @@ class ChatInputRow extends StatelessWidget {
|
|||
onSelected: controller.onAddPopupMenuButtonSelected,
|
||||
itemBuilder: (BuildContext context) =>
|
||||
<PopupMenuEntry<String>>[
|
||||
PopupMenuItem<String>(
|
||||
value: 'videocall',
|
||||
child: ListTile(
|
||||
leading: const CircleAvatar(
|
||||
backgroundColor: Colors.blueGrey,
|
||||
foregroundColor: Colors.white,
|
||||
child: Icon(Icons.video_call_outlined),
|
||||
),
|
||||
title: Text(L10n.of(context)!.videoCall),
|
||||
contentPadding: const EdgeInsets.all(0),
|
||||
),
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
value: 'file',
|
||||
child: ListTile(
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
|
|||
import 'package:future_loading_dialog/future_loading_dialog.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
import 'package:matrix_link_text/link_text.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import 'package:fluffychat/pages/chat/events/video_player.dart';
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart';
|
||||
|
|
@ -172,14 +171,6 @@ class MessageContent extends StatelessWidget {
|
|||
case MessageTypes.None:
|
||||
textmessage:
|
||||
default:
|
||||
if (event.content['msgtype'] == Matrix.callNamespace) {
|
||||
return _ButtonContent(
|
||||
onPressed: () => launch(event.body),
|
||||
icon: const Icon(Icons.phone_outlined, color: Colors.green),
|
||||
label: L10n.of(context)!.videoCall,
|
||||
textColor: buttonTextColor,
|
||||
);
|
||||
}
|
||||
if (event.redacted) {
|
||||
return _ButtonContent(
|
||||
label: L10n.of(context)!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue