Skip to content

Commit

Permalink
TW-1902 update chat list item ui
Browse files Browse the repository at this point in the history
TW-1902 update icons, text style

TW-1920 add delivery state for chatlist items

TW-1902 added image preview in chat_list

TW-1902 added video preview for chat list items

TW-1902 fixed bottom navigation avatar sync
  • Loading branch information
KhaledNjim authored and nqhhdev committed Sep 17, 2024
1 parent 1bd7682 commit 0051826
Show file tree
Hide file tree
Showing 25 changed files with 345 additions and 279 deletions.
8 changes: 2 additions & 6 deletions assets/images/ic_encrypted.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 10 additions & 8 deletions assets/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@
"type": "text",
"placeholders": {}
},
"friday": "Friday",
"friday": "Fri",
"@friday": {
"type": "text",
"placeholders": {}
Expand Down Expand Up @@ -1247,7 +1247,7 @@
"type": "text",
"placeholders": {}
},
"monday": "Monday",
"monday": "Mon",
"@monday": {
"type": "text",
"placeholders": {}
Expand Down Expand Up @@ -1692,7 +1692,7 @@
"type": "text",
"placeholders": {}
},
"saturday": "Saturday",
"saturday": "Sat",
"@saturday": {
"type": "text",
"placeholders": {}
Expand Down Expand Up @@ -1951,7 +1951,7 @@
"type": "text",
"placeholders": {}
},
"sunday": "Sunday",
"sunday": "Sun",
"@sunday": {
"type": "text",
"placeholders": {}
Expand Down Expand Up @@ -1981,7 +1981,7 @@
"type": "text",
"placeholders": {}
},
"thursday": "Thursday",
"thursday": "Thu",
"@thursday": {
"type": "text",
"placeholders": {}
Expand Down Expand Up @@ -2022,7 +2022,7 @@
"type": "text",
"placeholders": {}
},
"tuesday": "Tuesday",
"tuesday": "Tue",
"@tuesday": {
"type": "text",
"placeholders": {}
Expand Down Expand Up @@ -2199,7 +2199,7 @@
"type": "text",
"placeholders": {}
},
"wednesday": "Wednesday",
"wednesday": "Wed",
"@wednesday": {
"type": "text",
"placeholders": {}
Expand Down Expand Up @@ -3102,5 +3102,7 @@
"sCameraLensDirectionLabel": "Camera lens direction: {value}",
"sCameraPreviewLabel": "Camera preview: {value}",
"sFlashModeLabel": "Flash mode: {mode}",
"sSwitchCameraLensDirectionLabel": "Switch to the {value} camera"
"sSwitchCameraLensDirectionLabel": "Switch to the {value} camera",
"photo": "Photo",
"video": "Video"
}
35 changes: 0 additions & 35 deletions assets/l10n/intl_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -809,11 +809,6 @@
"type": "text",
"placeholders": {}
},
"friday": "Vendredi",
"@friday": {
"type": "text",
"placeholders": {}
},
"fromJoining": "À partir de l'entrée dans le salon",
"@fromJoining": {
"type": "text",
Expand Down Expand Up @@ -1143,11 +1138,6 @@
"type": "text",
"placeholders": {}
},
"monday": "Lundi",
"@monday": {
"type": "text",
"placeholders": {}
},
"muteChat": "Mettre la discussion en sourdine",
"@muteChat": {
"type": "text",
Expand Down Expand Up @@ -1541,11 +1531,6 @@
"type": "text",
"placeholders": {}
},
"saturday": "Samedi",
"@saturday": {
"type": "text",
"placeholders": {}
},
"saveFile": "Enregistrer le fichier",
"@saveFile": {
"type": "text",
Expand Down Expand Up @@ -1785,11 +1770,6 @@
"type": "text",
"placeholders": {}
},
"sunday": "Dimanche",
"@sunday": {
"type": "text",
"placeholders": {}
},
"synchronizingPleaseWait": "Synchronisation... Veuillez patienter.",
"@synchronizingPleaseWait": {
"type": "text",
Expand All @@ -1815,11 +1795,6 @@
"type": "text",
"placeholders": {}
},
"thursday": "Jeudi",
"@thursday": {
"type": "text",
"placeholders": {}
},
"title": "FluffyChat",
"@title": {
"description": "Title for the application",
Expand Down Expand Up @@ -1856,11 +1831,6 @@
"type": "text",
"placeholders": {}
},
"tuesday": "Mardi",
"@tuesday": {
"type": "text",
"placeholders": {}
},
"unavailable": "Indisponible",
"@unavailable": {
"type": "text",
Expand Down Expand Up @@ -2031,11 +2001,6 @@
"type": "text",
"placeholders": {}
},
"wednesday": "Mercredi",
"@wednesday": {
"type": "text",
"placeholders": {}
},
"weSentYouAnEmail": "Nous vous avons envoyé un message",
"@weSentYouAnEmail": {
"type": "text",
Expand Down
35 changes: 0 additions & 35 deletions assets/l10n/intl_ru.arb
Original file line number Diff line number Diff line change
Expand Up @@ -800,11 +800,6 @@
"type": "text",
"placeholders": {}
},
"friday": "Пятница",
"@friday": {
"type": "text",
"placeholders": {}
},
"fromJoining": "С момента присоединения",
"@fromJoining": {
"type": "text",
Expand Down Expand Up @@ -1134,11 +1129,6 @@
"type": "text",
"placeholders": {}
},
"monday": "Понедельник",
"@monday": {
"type": "text",
"placeholders": {}
},
"muteChat": "Отключить уведомления",
"@muteChat": {
"type": "text",
Expand Down Expand Up @@ -1527,11 +1517,6 @@
"type": "text",
"placeholders": {}
},
"saturday": "Суббота",
"@saturday": {
"type": "text",
"placeholders": {}
},
"saveFile": "Сохранить файл",
"@saveFile": {
"type": "text",
Expand Down Expand Up @@ -1770,11 +1755,6 @@
"type": "text",
"placeholders": {}
},
"sunday": "Воскресенье",
"@sunday": {
"type": "text",
"placeholders": {}
},
"synchronizingPleaseWait": "Синхронизация… Пожалуйста, подождите.",
"@synchronizingPleaseWait": {
"type": "text",
Expand All @@ -1800,11 +1780,6 @@
"type": "text",
"placeholders": {}
},
"thursday": "Четверг",
"@thursday": {
"type": "text",
"placeholders": {}
},
"title": "FluffyChat",
"@title": {
"description": "Title for the application",
Expand Down Expand Up @@ -1841,11 +1816,6 @@
"type": "text",
"placeholders": {}
},
"tuesday": "Вторник",
"@tuesday": {
"type": "text",
"placeholders": {}
},
"unavailable": "Недоступен",
"@unavailable": {
"type": "text",
Expand Down Expand Up @@ -2016,11 +1986,6 @@
"type": "text",
"placeholders": {}
},
"wednesday": "Среда",
"@wednesday": {
"type": "text",
"placeholders": {}
},
"weSentYouAnEmail": "Мы отправили вам электронное письмо",
"@weSentYouAnEmail": {
"type": "text",
Expand Down
5 changes: 3 additions & 2 deletions lib/pages/chat/chat_app_bar_title.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ class ChatAppBarTitle extends StatelessWidget {
padding: const EdgeInsets.all(2.0),
child: SvgPicture.asset(
ImagePaths.icEncrypted,
width: 20,
height: 20,
width: 16,
height: 16,
),
),
const SizedBox(width: 4),
Flexible(
child: Text(
roomName ??
Expand Down
1 change: 0 additions & 1 deletion lib/pages/chat_list/chat_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,6 @@ class ChatListController extends State<ChatList>
WidgetsBinding.instance.addPostFrameCallback((_) async {
if (mounted) {
Matrix.of(context).backgroundPush?.setupPush();
await matrixState.retrievePersistedActiveClient();
}
});
_checkTorBrowser();
Expand Down
47 changes: 10 additions & 37 deletions lib/pages/chat_list/chat_list_body_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import 'package:fluffychat/pages/chat_list/chat_list_view_builder.dart';
import 'package:fluffychat/pages/chat_list/space_view.dart';
import 'package:fluffychat/presentation/enum/chat_list/chat_list_enum.dart';
import 'package:fluffychat/resource/image_paths.dart';
import 'package:fluffychat/utils/extension/value_notifier_extension.dart';
import 'package:fluffychat/utils/stream_extension.dart';
import 'package:fluffychat/widgets/connection_status_header.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -148,15 +147,7 @@ class ChatListBodyView extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ExpandableTitleBuilder(
title: L10n.of(context)!.countPinChat(
controller.filteredRoomsForPin.length,
),
isExpanded: isExpanded,
onTap: controller
.expandRoomsForPinNotifier.toggle,
),
if (isExpanded) child!,
child!,
],
);
},
Expand All @@ -166,33 +157,15 @@ class ChatListBodyView extends StatelessWidget {
),
),
if (!controller.filteredRoomsForAllIsEmpty)
ValueListenableBuilder(
valueListenable: controller.expandRoomsForAllNotifier,
builder: (context, isExpanded, child) {
return Padding(
padding: ChatListBodyViewStyle
.paddingTopExpandableTitleBuilder,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ExpandableTitleBuilder(
title: L10n.of(context)!.countAllChat(
controller.filteredRoomsForAll.length,
),
isExpanded: isExpanded,
onTap: controller
.expandRoomsForAllNotifier.toggle,
),
if (isExpanded) child!,
],
),
);
},
child: ChatListViewBuilder(
controller: controller,
rooms: controller.filteredRoomsForAll,
),
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ChatListViewBuilder(
controller: controller,
rooms: controller.filteredRoomsForAll,
),
],
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/chat_list/chat_list_header_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ChatListHeaderStyle {
prefixIcon: Icon(
Icons.search,
size: ChatListHeaderStyle.searchIconSize,
color: prefixIconColor ?? Theme.of(context).colorScheme.onSurface,
color: prefixIconColor ?? LinagoraRefColors.material().neutral[60],
),
suffixIcon: const SizedBox.shrink(),
);
Expand Down
Loading

0 comments on commit 0051826

Please sign in to comment.