diff --git a/assets/l10n/intl_en.arb b/assets/l10n/intl_en.arb index 183ecf1913..f718dcb1c1 100644 --- a/assets/l10n/intl_en.arb +++ b/assets/l10n/intl_en.arb @@ -2943,7 +2943,6 @@ "contactsCount": "Contacts ({count})", "linagoraContactsCount": "Linagora contacts ({count})", "fetchingPhonebookContacts": "Fetching contacts from device...({progress}% completed)", - "activeNow": "Active now", "languageEnglish": "English", "@languageEnglish": { "type": "text", diff --git a/lib/pages/add_story/add_story_view.dart b/lib/pages/add_story/add_story_view.dart index 26df156bf0..2e6ff98d4d 100644 --- a/lib/pages/add_story/add_story_view.dart +++ b/lib/pages/add_story/add_story_view.dart @@ -18,7 +18,7 @@ class AddStoryView extends StatelessWidget { backgroundColor: Colors.blueGrey.shade900, appBar: AppBar( leading: TwakeIconButton( - icon: Icons.arrow_back, + icon: Icons.arrow_back_ios, tooltip: L10n.of(context)!.back, onTap: () => context.pop(), ), diff --git a/lib/pages/archive/archive_view.dart b/lib/pages/archive/archive_view.dart index 841664a601..dfc188aea2 100644 --- a/lib/pages/archive/archive_view.dart +++ b/lib/pages/archive/archive_view.dart @@ -19,7 +19,7 @@ class ArchiveView extends StatelessWidget { builder: (BuildContext context, snapshot) => Scaffold( appBar: AppBar( leading: TwakeIconButton( - icon: Icons.arrow_back, + icon: Icons.arrow_back_ios, tooltip: L10n.of(context)!.back, onTap: () => context.pop(), ), diff --git a/lib/pages/chat/chat_app_bar_title.dart b/lib/pages/chat/chat_app_bar_title.dart index 2e16579362..cb47435d7c 100644 --- a/lib/pages/chat/chat_app_bar_title.dart +++ b/lib/pages/chat/chat_app_bar_title.dart @@ -266,7 +266,7 @@ class ChatAppBarTitleText extends StatelessWidget { @override Widget build(BuildContext context) { - final TextStyle? statusTextStyle = text == L10n.of(context)!.activeNow + final TextStyle? statusTextStyle = text == L10n.of(context)!.online ? ChatAppBarTitleStyle.onlineStatusTextStyle(context) : ChatAppBarTitleStyle.offlineStatusTextStyle(context); diff --git a/lib/pages/chat/chat_app_bar_title_style.dart b/lib/pages/chat/chat_app_bar_title_style.dart index c4354354c6..390843c852 100644 --- a/lib/pages/chat/chat_app_bar_title_style.dart +++ b/lib/pages/chat/chat_app_bar_title_style.dart @@ -45,11 +45,11 @@ class ChatAppBarTitleStyle { static TextStyle? onlineStatusTextStyle(BuildContext context) => responsive.isMobile(context) ? Theme.of(context).textTheme.labelMedium?.copyWith( - color: LinagoraRefColors.material().secondary, + color: LinagoraRefColors.material().secondary[40], letterSpacing: ChatAppBarTitleStyle.letterSpacingStatusContent, ) : Theme.of(context).textTheme.bodySmall?.copyWith( - color: LinagoraRefColors.material().secondary, + color: LinagoraRefColors.material().secondary[40], letterSpacing: ChatAppBarTitleStyle.letterSpacingRoomName, ); } diff --git a/lib/pages/chat/chat_pinned_events/pinned_messages_screen.dart b/lib/pages/chat/chat_pinned_events/pinned_messages_screen.dart index c4421d7bb2..25b673b1e9 100644 --- a/lib/pages/chat/chat_pinned_events/pinned_messages_screen.dart +++ b/lib/pages/chat/chat_pinned_events/pinned_messages_screen.dart @@ -39,7 +39,7 @@ class PinnedMessagesScreen extends StatelessWidget { ), leading: TwakeIconButton( tooltip: L10n.of(context)!.back, - icon: Icons.arrow_back, + icon: Icons.arrow_back_ios, onTap: controller.onClickBackButton, ), actions: [ diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index 55c66525c5..6adfdf4cf6 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -233,7 +233,7 @@ class ChatView extends StatelessWidget with MessageContentMixin { padding: const EdgeInsets.only(left: 8), child: TwakeIconButton( tooltip: L10n.of(context)!.back, - icon: Icons.arrow_back, + icon: Icons.arrow_back_ios, onTap: controller.onBackPress, paddingAll: 8.0, margin: const EdgeInsets.symmetric(vertical: 12.0), diff --git a/lib/pages/chat_details/chat_details_edit_view.dart b/lib/pages/chat_details/chat_details_edit_view.dart index 5c638648ae..5f64d3bd85 100644 --- a/lib/pages/chat_details/chat_details_edit_view.dart +++ b/lib/pages/chat_details/chat_details_edit_view.dart @@ -53,7 +53,7 @@ class ChatDetailsEditView extends StatelessWidget { hoverColor: Colors.transparent, splashColor: Colors.transparent, onPressed: controller.onBack, - icon: const Icon(Icons.arrow_back), + icon: const Icon(Icons.arrow_back_ios), ), ), Text( diff --git a/lib/pages/chat_details/chat_details_view.dart b/lib/pages/chat_details/chat_details_view.dart index 331b30592e..c7b6b44eb6 100644 --- a/lib/pages/chat_details/chat_details_view.dart +++ b/lib/pages/chat_details/chat_details_view.dart @@ -60,7 +60,7 @@ class ChatDetailsView extends StatelessWidget { highlightColor: Colors.transparent, onPressed: controller.widget.closeRightColumn, icon: controller.widget.isInStack - ? const Icon(Icons.arrow_back) + ? const Icon(Icons.arrow_back_ios) : const Icon(Icons.close), ), ), diff --git a/lib/pages/chat_draft/draft_chat_view.dart b/lib/pages/chat_draft/draft_chat_view.dart index b16ab75f2e..0d19542f60 100644 --- a/lib/pages/chat_draft/draft_chat_view.dart +++ b/lib/pages/chat_draft/draft_chat_view.dart @@ -47,7 +47,7 @@ class DraftChatView extends StatelessWidget { hoverColor: Colors.transparent, highlightColor: Colors.transparent, tooltip: L10n.of(context)!.back, - icon: Icons.arrow_back, + icon: Icons.arrow_back_ios, onTap: () => context.pop(), paddingAll: 8.0, margin: const EdgeInsets.symmetric(vertical: 12.0), diff --git a/lib/pages/chat_profile_info/chat_profile_info_view.dart b/lib/pages/chat_profile_info/chat_profile_info_view.dart index 29660f9e15..759a5ed2db 100644 --- a/lib/pages/chat_profile_info/chat_profile_info_view.dart +++ b/lib/pages/chat_profile_info/chat_profile_info_view.dart @@ -45,7 +45,7 @@ class ChatProfileInfoView extends StatelessWidget { child: IconButton( onPressed: controller.widget.onBack, icon: controller.widget.isInStack - ? const Icon(Icons.arrow_back) + ? const Icon(Icons.arrow_back_ios) : const Icon(Icons.close), ), ), diff --git a/lib/pages/chat_search/chat_search_view.dart b/lib/pages/chat_search/chat_search_view.dart index 13552e785a..0c5dd2f38b 100644 --- a/lib/pages/chat_search/chat_search_view.dart +++ b/lib/pages/chat_search/chat_search_view.dart @@ -329,7 +329,7 @@ class _ChatSearchAppBar extends StatelessWidget { Padding( padding: ChatViewStyle.paddingLeading(context), child: TwakeIconButton( - icon: Icons.arrow_back, + icon: Icons.arrow_back_ios, onTap: controller.onBack, tooltip: L10n.of(context)!.back, ), diff --git a/lib/pages/dialer/dialer.dart b/lib/pages/dialer/dialer.dart index b9360577e1..c8871cd187 100644 --- a/lib/pages/dialer/dialer.dart +++ b/lib/pages/dialer/dialer.dart @@ -631,7 +631,7 @@ class MyCallingPage extends State { left: 24.0, child: IconButton( color: Colors.black45, - icon: const Icon(Icons.arrow_back), + icon: const Icon(Icons.arrow_back_ios), onPressed: () { PIPView.of(context)?.setFloating(true); }, diff --git a/lib/pages/error_page/error_page.dart b/lib/pages/error_page/error_page.dart index 526300565f..db96212a01 100644 --- a/lib/pages/error_page/error_page.dart +++ b/lib/pages/error_page/error_page.dart @@ -75,7 +75,7 @@ class _ErrorPageBackButton extends StatelessWidget { @override Widget build(BuildContext context) { return TextButton.icon( - icon: const Icon(Icons.arrow_back), + icon: const Icon(Icons.arrow_back_ios), onPressed: () => _goToRooms(context), label: Text( L10n.of(context)!.errorPageButton, diff --git a/lib/pages/homeserver_picker/homeserver_app_bar.dart b/lib/pages/homeserver_picker/homeserver_app_bar.dart index 239ef26b5d..81faa0dd8f 100644 --- a/lib/pages/homeserver_picker/homeserver_app_bar.dart +++ b/lib/pages/homeserver_picker/homeserver_app_bar.dart @@ -20,7 +20,7 @@ class HomeserverAppBar extends StatelessWidget { prefixIcon: Navigator.of(context).canPop() ? IconButton( onPressed: Navigator.of(context).pop, - icon: const Icon(Icons.arrow_back), + icon: const Icon(Icons.arrow_back_ios), ) : null, prefixText: '${L10n.of(context)!.homeserver}: ', diff --git a/lib/pages/homeserver_picker/homeserver_picker_view.dart b/lib/pages/homeserver_picker/homeserver_picker_view.dart index fca89fd529..0496152e0d 100644 --- a/lib/pages/homeserver_picker/homeserver_picker_view.dart +++ b/lib/pages/homeserver_picker/homeserver_picker_view.dart @@ -22,7 +22,7 @@ class HomeserverPickerView extends StatelessWidget { appBar: PlatformInfos.isMobile ? AppBar( leading: TwakeIconButton( - icon: Icons.arrow_back, + icon: Icons.arrow_back_ios, onTap: controller.state != HomeserverState.loading ? () => context.pop() : null, diff --git a/lib/pages/image_viewer/media_viewer_app_bar_view.dart b/lib/pages/image_viewer/media_viewer_app_bar_view.dart index b8a724bc37..3474d7f5c7 100644 --- a/lib/pages/image_viewer/media_viewer_app_bar_view.dart +++ b/lib/pages/image_viewer/media_viewer_app_bar_view.dart @@ -39,7 +39,7 @@ class MediaViewerAppbarView extends StatelessWidget { IconButton( icon: Icon( MediaViewerAppBar.responsiveUtils.isMobile(context) - ? Icons.arrow_back_rounded + ? Icons.arrow_back_ios_rounded : Icons.close, color: LinagoraSysColors.material().onPrimary, ), diff --git a/lib/pages/image_viewer/media_viewer_app_bar_web.dart b/lib/pages/image_viewer/media_viewer_app_bar_web.dart index 02ae3585b7..824f2e2c5e 100644 --- a/lib/pages/image_viewer/media_viewer_app_bar_web.dart +++ b/lib/pages/image_viewer/media_viewer_app_bar_web.dart @@ -38,7 +38,7 @@ class MediaViewerAppBarWeb extends StatelessWidget IconButton( icon: Icon( MediaViewerAppBar.responsiveUtils.isMobile(context) - ? Icons.arrow_back_rounded + ? Icons.arrow_back_ios_rounded : Icons.close, color: LinagoraSysColors.material().onPrimary, ), diff --git a/lib/pages/new_group/new_group_chat_info_view.dart b/lib/pages/new_group/new_group_chat_info_view.dart index ab750db249..36a63e2a23 100644 --- a/lib/pages/new_group/new_group_chat_info_view.dart +++ b/lib/pages/new_group/new_group_chat_info_view.dart @@ -136,7 +136,7 @@ class NewGroupChatInfoView extends StatelessWidget { title: Row( children: [ TwakeIconButton( - icon: Icons.arrow_back, + icon: Icons.arrow_back_ios, onTap: () => Navigator.of(context).pop(), tooltip: L10n.of(context)!.back, paddingAll: NewGroupChatInfoStyle.backIconPaddingAll, diff --git a/lib/pages/new_private_chat/widget/contact_status_widget.dart b/lib/pages/new_private_chat/widget/contact_status_widget.dart index d19ac88595..e2acf0cfa4 100644 --- a/lib/pages/new_private_chat/widget/contact_status_widget.dart +++ b/lib/pages/new_private_chat/widget/contact_status_widget.dart @@ -13,7 +13,7 @@ class ContactStatusWidget extends StatelessWidget { required this.status, }); - final Color activeColor = const Color(0xFF43A843); + final Color? activeColor = LinagoraRefColors.material().secondary[40]; final Color? inactiveColor = LinagoraRefColors.material().neutral[60]; @override @@ -30,7 +30,7 @@ class ContactStatusWidget extends StatelessWidget { ), status == ContactStatus.active ? Text( - " ${L10n.of(context)!.active}", + " ${L10n.of(context)!.online}", style: Theme.of(context).textTheme.bodySmall?.copyWith( color: activeColor, ), diff --git a/lib/pages/profile_info/profile_info_view.dart b/lib/pages/profile_info/profile_info_view.dart index 4940112bec..cac3b5b4b3 100644 --- a/lib/pages/profile_info/profile_info_view.dart +++ b/lib/pages/profile_info/profile_info_view.dart @@ -43,7 +43,7 @@ class ProfileInfoView extends StatelessWidget { hoverColor: Colors.transparent, highlightColor: Colors.transparent, onPressed: () => Navigator.of(context).pop(), - icon: const Icon(Icons.arrow_back), + icon: const Icon(Icons.arrow_back_ios), ), ), Flexible( diff --git a/lib/pages/search/search_view.dart b/lib/pages/search/search_view.dart index ec49ace267..e7a5c3aa19 100644 --- a/lib/pages/search/search_view.dart +++ b/lib/pages/search/search_view.dart @@ -178,7 +178,7 @@ class SearchView extends StatelessWidget { children: [ TwakeIconButton( tooltip: L10n.of(context)!.back, - icon: Icons.arrow_back, + icon: Icons.arrow_back_ios, onTap: () => Navigator.of(context).pop(), paddingAll: SearchViewStyle.paddingBackButton, ), diff --git a/lib/pages/settings_dashboard/settings_profile/settings_profile_view.dart b/lib/pages/settings_dashboard/settings_profile/settings_profile_view.dart index 807d68131b..c082dbceef 100644 --- a/lib/pages/settings_dashboard/settings_profile/settings_profile_view.dart +++ b/lib/pages/settings_dashboard/settings_profile/settings_profile_view.dart @@ -35,7 +35,7 @@ class SettingsProfileView extends StatelessWidget { leading: responsive.isMobile(context) ? IconButton( icon: const Icon( - Icons.arrow_back, + Icons.arrow_back_ios, size: SettingsProfileViewStyle.sizeIcon, ), onPressed: () => context.pop(), diff --git a/lib/pages/twake_welcome/twake_welcome_view.dart b/lib/pages/twake_welcome/twake_welcome_view.dart index 84ce238e28..1283ae7072 100644 --- a/lib/pages/twake_welcome/twake_welcome_view.dart +++ b/lib/pages/twake_welcome/twake_welcome_view.dart @@ -21,7 +21,7 @@ class TwakeWelcomeView extends StatelessWidget { ? AppBar( backgroundColor: Colors.transparent, leading: TwakeIconButton( - icon: Icons.arrow_back, + icon: Icons.arrow_back_ios, onTap: () => context.pop(), tooltip: L10n.of(context)!.back, ), diff --git a/lib/utils/room_status_extension.dart b/lib/utils/room_status_extension.dart index 776d563c3c..1851d673c1 100644 --- a/lib/utils/room_status_extension.dart +++ b/lib/utils/room_status_extension.dart @@ -104,13 +104,13 @@ extension RoomStatusExtension on Room { ) { if (directChatPresence != null) { if (directChatPresence.presence == PresenceType.online) { - return L10n.of(context)!.activeNow; + return L10n.of(context)!.online; } final lastActiveDateTime = directChatPresence.lastActiveTimestamp; final currentDateTime = DateTime.now(); if (lastActiveDateTime != null) { if (lastActiveDateTime.isLessThanOneMinuteAgo()) { - return L10n.of(context)!.activeNow; + return L10n.of(context)!.online; } else if (lastActiveDateTime.isLessThanOneHourAgo()) { return L10n.of(context)!.onlineMinAgo( currentDateTime.difference(lastActiveDateTime).inMinutes, diff --git a/lib/widgets/app_bars/searchable_app_bar.dart b/lib/widgets/app_bars/searchable_app_bar.dart index 97fb7d3404..404d34ce10 100644 --- a/lib/widgets/app_bars/searchable_app_bar.dart +++ b/lib/widgets/app_bars/searchable_app_bar.dart @@ -60,7 +60,7 @@ class SearchableAppBar extends StatelessWidget { children: [ if (isFullScreen) ...[ TwakeIconButton( - icon: Icons.arrow_back, + icon: Icons.arrow_back_ios, onTap: () { if (!FirstColumnInnerRoutes.instance .goRouteAvailableInFirstColumn()) { diff --git a/test/utils/get_localize_status_test.dart b/test/utils/get_localize_status_test.dart index c1c284fe99..5bc0911043 100644 --- a/test/utils/get_localize_status_test.dart +++ b/test/utils/get_localize_status_test.dart @@ -20,10 +20,14 @@ void main() async { group("getLocalizedStatus function test", () { const textWidgetKey = ValueKey('textWidget'); + const offlineStatus = 'Offline'; + const onlineStatus = 'Online'; + const mockUserId = 'mockUserid'; + const aWhileAgoStatus = 'a while ago'; testWidgets( 'GIVEN the presenceType be online\n' - 'THEN should display the status as active now\n', + 'THEN should display the status as Online\n', (WidgetTester tester) async { // Given final presence = CachedPresence( @@ -31,7 +35,7 @@ void main() async { 0, "", true, - "testuserid", + mockUserId, ); // WHEN @@ -46,12 +50,12 @@ void main() async { expect(textWidget.data, isNotNull); - expect(textWidget.data, equals('Active now')); + expect(textWidget.data, equals(onlineStatus)); }); testWidgets( 'GIVEN the presence time to be one minute from present with currently active be false\n' - 'THEN should display the status as active now\n', + 'THEN should display the status as Online\n', (WidgetTester tester) async { // Given final lessThanOneMinuteAgo = const Duration(seconds: 30).inMilliseconds; @@ -60,7 +64,7 @@ void main() async { lessThanOneMinuteAgo, "", false, - "testuserid", + mockUserId, ); // WHEN @@ -74,7 +78,7 @@ void main() async { expect(textWidget.data, isNotNull); - expect(textWidget.data, equals('Active now')); + expect(textWidget.data, equals(onlineStatus)); }); testWidgets( @@ -88,7 +92,7 @@ void main() async { lessThan10MinutesAgo, "", false, - "testuserid", + mockUserId, ); // WHEN @@ -116,7 +120,7 @@ void main() async { lessThan10MinutesAgo, "", false, - "testuserid", + mockUserId, ); // WHEN @@ -144,7 +148,7 @@ void main() async { lessThan20hoursAgo, "", false, - "testuserid", + mockUserId, ); // WHEN @@ -172,7 +176,7 @@ void main() async { lessThan5daysAgo, "", false, - "testuserid", + mockUserId, ); // WHEN @@ -200,7 +204,7 @@ void main() async { lessThan60daysAgo, "", false, - "testuserid", + mockUserId, ); // WHEN @@ -214,7 +218,7 @@ void main() async { expect(textWidget.data, isNotNull); - expect(textWidget.data, equals('a while ago')); + expect(textWidget.data, equals(aWhileAgoStatus)); }); testWidgets( @@ -228,7 +232,7 @@ void main() async { lessThan60daysAgo, "", false, - "testuserid", + mockUserId, ); // WHEN @@ -242,7 +246,7 @@ void main() async { expect(textWidget.data, isNotNull); - expect(textWidget.data, equals('a while ago')); + expect(textWidget.data, equals(aWhileAgoStatus)); }); testWidgets( @@ -255,7 +259,7 @@ void main() async { null, "", false, - "testuserid", + mockUserId, ); // WHEN @@ -269,7 +273,7 @@ void main() async { expect(textWidget.data, isNotNull); - expect(textWidget.data, equals('Offline')); + expect(textWidget.data, equals(offlineStatus)); }); testWidgets( @@ -282,7 +286,7 @@ void main() async { null, "", false, - "testuserid", + mockUserId, ); // WHEN @@ -296,7 +300,7 @@ void main() async { expect(textWidget.data, isNotNull); - expect(textWidget.data, equals('Offline')); + expect(textWidget.data, equals(offlineStatus)); }); testWidgets( @@ -317,7 +321,7 @@ void main() async { expect(textWidget.data, isNotNull); - expect(textWidget.data, equals('Offline')); + expect(textWidget.data, equals(offlineStatus)); }); }); } diff --git a/test/widget/app_bars/searchable_app_bar_test.dart b/test/widget/app_bars/searchable_app_bar_test.dart index bfc6ef108e..5d7c01c2f2 100644 --- a/test/widget/app_bars/searchable_app_bar_test.dart +++ b/test/widget/app_bars/searchable_app_bar_test.dart @@ -61,7 +61,7 @@ void main() { expect(find.text("Hint"), findsOneWidget); expect(find.byIcon(Icons.search_outlined), findsOneWidget); expect(find.byIcon(Icons.close), findsOneWidget); - expect(find.byIcon(Icons.arrow_back), findsNothing); + expect(find.byIcon(Icons.arrow_back_ios), findsNothing); }); testWidgets("Still one textfield when clicking on title", @@ -102,7 +102,7 @@ void main() { expect(find.text("Title"), findsOneWidget); expect(find.text("Hint"), findsNothing); expect(find.byIcon(Icons.search_outlined), findsNothing); - expect(find.byIcon(Icons.arrow_back), findsOneWidget); + expect(find.byIcon(Icons.arrow_back_ios), findsOneWidget); expect(find.byIcon(Icons.close), findsNothing); }); @@ -137,7 +137,7 @@ void main() { expect(find.text("Hint"), findsNothing); expect(find.byIcon(Icons.search_outlined), findsNothing); expect(find.byIcon(Icons.close), findsNothing); - expect(find.byIcon(Icons.arrow_back), findsOneWidget); + expect(find.byIcon(Icons.arrow_back_ios), findsOneWidget); }); testWidgets("change displayBackButton does nothing", (widgetTester) async { @@ -150,7 +150,7 @@ void main() { expect(find.text("Title"), findsOneWidget); expect(find.text("Hint"), findsNothing); expect(find.byIcon(Icons.search_outlined), findsNothing); - expect(find.byIcon(Icons.arrow_back), findsOneWidget); + expect(find.byIcon(Icons.arrow_back_ios), findsOneWidget); expect(find.byIcon(Icons.close), findsNothing); }); });