|
|
@ -16,10 +16,8 @@ import 'package:image_picker/image_picker.dart';
|
|
|
|
import 'package:matrix/matrix.dart';
|
|
|
|
import 'package:matrix/matrix.dart';
|
|
|
|
import 'package:record/record.dart';
|
|
|
|
import 'package:record/record.dart';
|
|
|
|
import 'package:scroll_to_index/scroll_to_index.dart';
|
|
|
|
import 'package:scroll_to_index/scroll_to_index.dart';
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
import 'package:vrouter/vrouter.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/chat_view.dart';
|
|
|
|
import 'package:fluffychat/pages/chat/cupertino_widgets_bottom_sheet.dart';
|
|
|
|
import 'package:fluffychat/pages/chat/cupertino_widgets_bottom_sheet.dart';
|
|
|
|
import 'package:fluffychat/pages/chat/event_info_dialog.dart';
|
|
|
|
import 'package:fluffychat/pages/chat/event_info_dialog.dart';
|
|
|
@ -128,20 +126,6 @@ class ChatController extends State<Chat> {
|
|
|
|
|
|
|
|
|
|
|
|
EmojiPickerType emojiPickerType = EmojiPickerType.keyboard;
|
|
|
|
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 {
|
|
|
|
void requestHistory() async {
|
|
|
|
if (canLoadMore) {
|
|
|
|
if (canLoadMore) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -878,9 +862,6 @@ class ChatController extends State<Chat> {
|
|
|
|
if (choice == 'location') {
|
|
|
|
if (choice == 'location') {
|
|
|
|
sendLocationAction();
|
|
|
|
sendLocationAction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (choice == 'videocall') {
|
|
|
|
|
|
|
|
startCallAction();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
unpinEvent(String eventId) async {
|
|
|
|
unpinEvent(String eventId) async {
|
|
|
|