mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 04:04:18 +00:00 
			
		
		
		
	Adapt conversations color for #Forez
This commit is contained in:
		@@ -35,6 +35,7 @@ void main() {
 | 
				
			|||||||
    appName: "#Forez",
 | 
					    appName: "#Forez",
 | 
				
			||||||
    appQuickDescription: tr("Events organisation in Forez plain"),
 | 
					    appQuickDescription: tr("Events organisation in Forez plain"),
 | 
				
			||||||
    unreadConversationColor: Colors.green.shade900,
 | 
					    unreadConversationColor: Colors.green.shade900,
 | 
				
			||||||
 | 
					    defaultConversationColor: 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),
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,6 +24,7 @@ class Config {
 | 
				
			|||||||
  final String appName;
 | 
					  final String appName;
 | 
				
			||||||
  final String appQuickDescription;
 | 
					  final String appQuickDescription;
 | 
				
			||||||
  final Color unreadConversationColor;
 | 
					  final Color unreadConversationColor;
 | 
				
			||||||
 | 
					  final Color defaultConversationColor;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Entries for the welcome tour
 | 
					  // Entries for the welcome tour
 | 
				
			||||||
  final TourEntriesBuilder toursEntriesBuilder;
 | 
					  final TourEntriesBuilder toursEntriesBuilder;
 | 
				
			||||||
@@ -44,6 +45,7 @@ class Config {
 | 
				
			|||||||
    this.primaryColorDark,
 | 
					    this.primaryColorDark,
 | 
				
			||||||
    this.appName = "Comunic",
 | 
					    this.appName = "Comunic",
 | 
				
			||||||
    this.appQuickDescription,
 | 
					    this.appQuickDescription,
 | 
				
			||||||
 | 
					    this.defaultConversationColor,
 | 
				
			||||||
    this.unreadConversationColor,
 | 
					    this.unreadConversationColor,
 | 
				
			||||||
    this.toursEntriesBuilder,
 | 
					    this.toursEntriesBuilder,
 | 
				
			||||||
    this.additionalLoading,
 | 
					    this.additionalLoading,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,6 +7,7 @@ import 'package:comunic/helpers/users_helper.dart';
 | 
				
			|||||||
import 'package:comunic/lists/conversation_messages_list.dart';
 | 
					import 'package:comunic/lists/conversation_messages_list.dart';
 | 
				
			||||||
import 'package:comunic/lists/users_list.dart';
 | 
					import 'package:comunic/lists/users_list.dart';
 | 
				
			||||||
import 'package:comunic/models/api_request.dart';
 | 
					import 'package:comunic/models/api_request.dart';
 | 
				
			||||||
 | 
					import 'package:comunic/models/config.dart';
 | 
				
			||||||
import 'package:comunic/models/conversation.dart';
 | 
					import 'package:comunic/models/conversation.dart';
 | 
				
			||||||
import 'package:comunic/models/conversation_message.dart';
 | 
					import 'package:comunic/models/conversation_message.dart';
 | 
				
			||||||
import 'package:comunic/models/new_conversation_message.dart';
 | 
					import 'package:comunic/models/new_conversation_message.dart';
 | 
				
			||||||
@@ -92,6 +93,7 @@ class _ConversationScreenState extends SafeState<ConversationScreen> {
 | 
				
			|||||||
  // Colors definition
 | 
					  // Colors definition
 | 
				
			||||||
  Color get _senderColor =>
 | 
					  Color get _senderColor =>
 | 
				
			||||||
      _conversation.color ??
 | 
					      _conversation.color ??
 | 
				
			||||||
 | 
					      config().defaultConversationColor ??
 | 
				
			||||||
      /*(darkTheme() ? Color(0xff2b343b) :*/ Colors.blue.shade700; //);
 | 
					      /*(darkTheme() ? Color(0xff2b343b) :*/ Colors.blue.shade700; //);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Color get _receiverColor =>
 | 
					  Color get _receiverColor =>
 | 
				
			||||||
@@ -100,11 +102,13 @@ class _ConversationScreenState extends SafeState<ConversationScreen> {
 | 
				
			|||||||
  Color get _greyColor => Color(0xff8f8f8f);
 | 
					  Color get _greyColor => Color(0xff8f8f8f);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Color get _gradientColorStart =>
 | 
					  Color get _gradientColorStart =>
 | 
				
			||||||
      _conversation.color ??
 | 
					      (_conversation.color ?? config().defaultConversationColor)
 | 
				
			||||||
 | 
					          ?.withOpacity(0.7) ??
 | 
				
			||||||
      (darkTheme() ? Color(0xff00b6f3) : Colors.blue.shade300);
 | 
					      (darkTheme() ? Color(0xff00b6f3) : Colors.blue.shade300);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Color get _gradientColorEnd =>
 | 
					  Color get _gradientColorEnd =>
 | 
				
			||||||
      _conversation.color?.withOpacity(0.7) ??
 | 
					      _conversation.color ??
 | 
				
			||||||
 | 
					      config().defaultConversationColor ??
 | 
				
			||||||
      (darkTheme() ? Color(0xff0184dc) : Colors.blueAccent.shade700);
 | 
					      (darkTheme() ? Color(0xff0184dc) : Colors.blueAccent.shade700);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Color get _separatorColor =>
 | 
					  Color get _separatorColor =>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user