diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index 3ae88f642..d035d3150 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -220,7 +220,7 @@ class ChatController extends State { } filteredEvents = timeline!.getFilteredEvents(unfolded: unfolded); timeline!.requestKeys(); - if (room!.hasNewMessages && + if ((room!.hasNewMessages || room!.notificationCount > 0) && timeline != null && timeline!.events.isNotEmpty && Matrix.of(context).webHasFocus) { @@ -819,6 +819,8 @@ class ChatController extends State { } } + bool get webrtcIsSupported => PlatformInfos.isMobile; + int? findChildIndexCallback(Key key, Map thisEventsKeyMap) { // this method is called very often. As such, it has to be optimized for speed. if (key is! ValueKey) { @@ -953,7 +955,8 @@ class ChatController extends State { } final callType = await showModalActionSheet( context: context, - title: L10n.of(context)!.videoCallsBetaWarning, + title: L10n.of(context)!.warning, + message: L10n.of(context)!.videoCallsBetaWarning, cancelLabel: L10n.of(context)!.cancel, actions: [ SheetAction( diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index e288e1ded..26aba31c2 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -113,11 +113,12 @@ class ChatView extends StatelessWidget { ]; } else { return [ - IconButton( - onPressed: controller.onPhoneButtonTap, - icon: const Icon(Icons.call_outlined), - tooltip: L10n.of(context)!.placeCall, - ), + if (controller.webrtcIsSupported) + IconButton( + onPressed: controller.onPhoneButtonTap, + icon: const Icon(Icons.call_outlined), + tooltip: L10n.of(context)!.placeCall, + ), EncryptionButton(controller.room!), ChatSettingsPopupMenu(controller.room!, !controller.room!.isDirectChat), ];