From b2072ab6264c8ec7a9b4df0473095c90b41b3f53 Mon Sep 17 00:00:00 2001 From: misha Date: Tue, 5 May 2026 10:40:11 +0300 Subject: [PATCH] feat(video_calls): fixed falling test --- .../chat/presentation/pages/chat_screen.dart | 32 ++++++++++--------- lib/generated/intl/messages_en.dart | 16 +++++----- lib/generated/intl/messages_ru.dart | 16 +++++----- 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/lib/features/chat/presentation/pages/chat_screen.dart b/lib/features/chat/presentation/pages/chat_screen.dart index 56b4a2db..4c7b96e6 100644 --- a/lib/features/chat/presentation/pages/chat_screen.dart +++ b/lib/features/chat/presentation/pages/chat_screen.dart @@ -768,24 +768,26 @@ class _ChatHeaderVideoCallButton extends StatelessWidget { @override Widget build(BuildContext context) { final theme = Theme.of(context); - return Tooltip( - message: S.of(context).video_call, - child: Material( - color: theme.colorScheme.onPrimary, - borderRadius: BorderRadius.circular(20), - elevation: 0, - child: InkWell( - onTap: onPressed, - customBorder: const CircleBorder(), - child: SizedBox( - width: 40, - height: 40, - child: Center( - child: Icon(Icons.videocam_rounded, color: appTheme.blueA400, size: 18), - ), + final tooltipMessage = S.maybeOf(context)?.video_call; + final button = Material( + color: theme.colorScheme.onPrimary, + borderRadius: BorderRadius.circular(20), + elevation: 0, + child: InkWell( + onTap: onPressed, + customBorder: const CircleBorder(), + child: SizedBox( + width: 40, + height: 40, + child: Center( + child: Icon(Icons.videocam_rounded, color: appTheme.blueA400, size: 18), ), ), ), ); + if (tooltipMessage == null || tooltipMessage.isEmpty) { + return button; + } + return Tooltip(message: tooltipMessage, child: button); } } diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index d6e949ad..096562d6 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -878,17 +878,10 @@ class MessageLookup extends MessageLookupByLibrary { "video_call_counterpart_default": MessageLookupByLibrary.simpleMessage( "Participant", ), - "video_call_you": MessageLookupByLibrary.simpleMessage("You"), - "video_call_poor_connection": MessageLookupByLibrary.simpleMessage( - "You have a poor internet connection", - ), - "video_call_recording_notice": MessageLookupByLibrary.simpleMessage( - "The video call will be recorded.\nThe consultation may be reviewed by Eatvio staff for quality assurance.", - ), + "video_call_leave": MessageLookupByLibrary.simpleMessage("Leave"), "video_call_muted_mic_warning": MessageLookupByLibrary.simpleMessage( "Attention!\nYour microphone is muted", ), - "video_call_leave": MessageLookupByLibrary.simpleMessage("Leave"), "video_call_permission_camera_description": MessageLookupByLibrary.simpleMessage( "Allow camera access so others can see you during the video call. If you declined, you can enable it in system settings.", @@ -902,12 +895,19 @@ class MessageLookup extends MessageLookupByLibrary { ), "video_call_permission_microphone_title": MessageLookupByLibrary.simpleMessage("Microphone access"), + "video_call_poor_connection": MessageLookupByLibrary.simpleMessage( + "You have a poor internet connection", + ), + "video_call_recording_notice": MessageLookupByLibrary.simpleMessage( + "The video call will be recorded.\nThe consultation may be reviewed by Eatvio staff for quality assurance.", + ), "video_call_role_consultant": MessageLookupByLibrary.simpleMessage( "Eatvio consultant", ), "video_call_sound": MessageLookupByLibrary.simpleMessage("Sound"), "video_call_unknown_initial": MessageLookupByLibrary.simpleMessage("?"), "video_call_video": MessageLookupByLibrary.simpleMessage("Video"), + "video_call_you": MessageLookupByLibrary.simpleMessage("You"), "violenceAndHostility": MessageLookupByLibrary.simpleMessage( "Насилие и вражда", ), diff --git a/lib/generated/intl/messages_ru.dart b/lib/generated/intl/messages_ru.dart index 52bd3dca..86adc84c 100644 --- a/lib/generated/intl/messages_ru.dart +++ b/lib/generated/intl/messages_ru.dart @@ -358,17 +358,10 @@ class MessageLookup extends MessageLookupByLibrary { "video_call_counterpart_default": MessageLookupByLibrary.simpleMessage( "Собеседник", ), - "video_call_you": MessageLookupByLibrary.simpleMessage("Вы"), - "video_call_poor_connection": MessageLookupByLibrary.simpleMessage( - "У вас плохое интернет соединение", - ), - "video_call_recording_notice": MessageLookupByLibrary.simpleMessage( - "Видеозвонок будет записан.\nКонсультация может быть проверена сотрудниками Итвио, на предмет качества оказания услуг.", - ), + "video_call_leave": MessageLookupByLibrary.simpleMessage("Выйти"), "video_call_muted_mic_warning": MessageLookupByLibrary.simpleMessage( "Внимание!\nУ вас выключен микрофон", ), - "video_call_leave": MessageLookupByLibrary.simpleMessage("Выйти"), "video_call_permission_camera_description": MessageLookupByLibrary.simpleMessage( "Чтобы вас видели во время видеозвонка, разрешите доступ к камере. При отказе можно включить доступ в настройках устройства.", @@ -382,12 +375,19 @@ class MessageLookup extends MessageLookupByLibrary { ), "video_call_permission_microphone_title": MessageLookupByLibrary.simpleMessage("Доступ к микрофону"), + "video_call_poor_connection": MessageLookupByLibrary.simpleMessage( + "У вас плохое интернет соединение", + ), + "video_call_recording_notice": MessageLookupByLibrary.simpleMessage( + "Видеозвонок будет записан.\nКонсультация может быть проверена сотрудниками Итвио, на предмет качества оказания услуг.", + ), "video_call_role_consultant": MessageLookupByLibrary.simpleMessage( "Консультант Итвио", ), "video_call_sound": MessageLookupByLibrary.simpleMessage("Звук"), "video_call_unknown_initial": MessageLookupByLibrary.simpleMessage("?"), "video_call_video": MessageLookupByLibrary.simpleMessage("Видео"), + "video_call_you": MessageLookupByLibrary.simpleMessage("Вы"), "waist": MessageLookupByLibrary.simpleMessage("Талия"), "waist_circumference": MessageLookupByLibrary.simpleMessage("Обхват талии"), "weight": MessageLookupByLibrary.simpleMessage("Вес"),