mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-30 16:29:30 +01:00
Merge branch 'krille/webrtc-fixes' into 'main'
chore: Webrtc follow up fixes See merge request famedly/fluffychat!743
This commit is contained in:
commit
03fceaea15
@ -220,7 +220,7 @@ class ChatController extends State<Chat> {
|
|||||||
}
|
}
|
||||||
filteredEvents = timeline!.getFilteredEvents(unfolded: unfolded);
|
filteredEvents = timeline!.getFilteredEvents(unfolded: unfolded);
|
||||||
timeline!.requestKeys();
|
timeline!.requestKeys();
|
||||||
if (room!.hasNewMessages &&
|
if ((room!.hasNewMessages || room!.notificationCount > 0) &&
|
||||||
timeline != null &&
|
timeline != null &&
|
||||||
timeline!.events.isNotEmpty &&
|
timeline!.events.isNotEmpty &&
|
||||||
Matrix.of(context).webHasFocus) {
|
Matrix.of(context).webHasFocus) {
|
||||||
@ -819,6 +819,8 @@ class ChatController extends State<Chat> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get webrtcIsSupported => PlatformInfos.isMobile;
|
||||||
|
|
||||||
int? findChildIndexCallback(Key key, Map<String, int> thisEventsKeyMap) {
|
int? findChildIndexCallback(Key key, Map<String, int> thisEventsKeyMap) {
|
||||||
// this method is called very often. As such, it has to be optimized for speed.
|
// this method is called very often. As such, it has to be optimized for speed.
|
||||||
if (key is! ValueKey) {
|
if (key is! ValueKey) {
|
||||||
@ -953,7 +955,8 @@ class ChatController extends State<Chat> {
|
|||||||
}
|
}
|
||||||
final callType = await showModalActionSheet<CallType>(
|
final callType = await showModalActionSheet<CallType>(
|
||||||
context: context,
|
context: context,
|
||||||
title: L10n.of(context)!.videoCallsBetaWarning,
|
title: L10n.of(context)!.warning,
|
||||||
|
message: L10n.of(context)!.videoCallsBetaWarning,
|
||||||
cancelLabel: L10n.of(context)!.cancel,
|
cancelLabel: L10n.of(context)!.cancel,
|
||||||
actions: [
|
actions: [
|
||||||
SheetAction(
|
SheetAction(
|
||||||
|
@ -113,11 +113,12 @@ class ChatView extends StatelessWidget {
|
|||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
return [
|
return [
|
||||||
IconButton(
|
if (controller.webrtcIsSupported)
|
||||||
onPressed: controller.onPhoneButtonTap,
|
IconButton(
|
||||||
icon: const Icon(Icons.call_outlined),
|
onPressed: controller.onPhoneButtonTap,
|
||||||
tooltip: L10n.of(context)!.placeCall,
|
icon: const Icon(Icons.call_outlined),
|
||||||
),
|
tooltip: L10n.of(context)!.placeCall,
|
||||||
|
),
|
||||||
EncryptionButton(controller.room!),
|
EncryptionButton(controller.room!),
|
||||||
ChatSettingsPopupMenu(controller.room!, !controller.room!.isDirectChat),
|
ChatSettingsPopupMenu(controller.room!, !controller.room!.isDirectChat),
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user