1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 04:49:21 +00:00

Customize unread conversation color

This commit is contained in:
Pierre HUBERT 2021-04-25 16:24:42 +02:00
parent a07c7af715
commit 616755aa38
3 changed files with 8 additions and 1 deletions

View File

@ -34,6 +34,7 @@ void main() {
primaryColorDark: Colors.green.shade900, primaryColorDark: Colors.green.shade900,
appName: "#Forez", appName: "#Forez",
appQuickDescription: tr("Events organisation in Forez plain"), appQuickDescription: tr("Events organisation in Forez plain"),
unreadConversationColor: Colors.green.shade900,
toursEntriesBuilder: buildTour, toursEntriesBuilder: buildTour,
additionalLoading: () => ForezGroupHelper.refreshInfo(), additionalLoading: () => ForezGroupHelper.refreshInfo(),
mainRouteBuilder: (c, k) => ForezRoute(key: k), mainRouteBuilder: (c, k) => ForezRoute(key: k),

View File

@ -23,6 +23,7 @@ class Config {
final Color primaryColorDark; final Color primaryColorDark;
final String appName; final String appName;
final String appQuickDescription; final String appQuickDescription;
final Color unreadConversationColor;
// Entries for the welcome tour // Entries for the welcome tour
final TourEntriesBuilder toursEntriesBuilder; final TourEntriesBuilder toursEntriesBuilder;
@ -43,6 +44,7 @@ class Config {
this.primaryColorDark, this.primaryColorDark,
this.appName = "Comunic", this.appName = "Comunic",
this.appQuickDescription, this.appQuickDescription,
this.unreadConversationColor,
this.toursEntriesBuilder, this.toursEntriesBuilder,
this.additionalLoading, this.additionalLoading,
this.mainRouteBuilder, this.mainRouteBuilder,

View File

@ -1,6 +1,7 @@
import 'package:comunic/helpers/conversations_helper.dart'; import 'package:comunic/helpers/conversations_helper.dart';
import 'package:comunic/lists/groups_list.dart'; import 'package:comunic/lists/groups_list.dart';
import 'package:comunic/lists/users_list.dart'; import 'package:comunic/lists/users_list.dart';
import 'package:comunic/models/config.dart';
import 'package:comunic/models/conversation.dart'; import 'package:comunic/models/conversation.dart';
import 'package:comunic/ui/routes/main_route/main_route.dart'; import 'package:comunic/ui/routes/main_route/main_route.dart';
import 'package:comunic/ui/widgets/conversation_image_widget.dart'; import 'package:comunic/ui/widgets/conversation_image_widget.dart';
@ -76,7 +77,10 @@ class ConversationTile extends StatelessWidget {
// Tile color // Tile color
tileColor: conversation.sawLastMessage tileColor: conversation.sawLastMessage
? null ? null
: (conversation.color ?? Colors.blue).withOpacity(0.2), : (conversation.color ??
config().unreadConversationColor ??
Colors.blue)
.withOpacity(0.2),
// Leading icon // Leading icon
leading: ConversationImageWidget( leading: ConversationImageWidget(