From 8b0bb0f3b2d979b6782187f79ba62a1e6b7f387a Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Wed, 8 Jul 2020 10:45:26 +0200 Subject: [PATCH] remove opacity difference for unread channels --- lib/src/channel_preview.dart | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/src/channel_preview.dart b/lib/src/channel_preview.dart index 40c2ee8e..9b113ca8 100644 --- a/lib/src/channel_preview.dart +++ b/lib/src/channel_preview.dart @@ -130,21 +130,20 @@ class ChannelPreview extends StatelessWidget { } Widget _buildSubtitle(BuildContext context) { - final opacity = channel.state.unreadCount > 0 ? 1.0 : 0.5; return TypingIndicator( channel: channel, - alternativeWidget: _buildLastMessage(context, opacity), + alternativeWidget: _buildLastMessage(context), style: StreamChatTheme.of(context).channelPreviewTheme.subtitle.copyWith( color: StreamChatTheme.of(context) .channelPreviewTheme .subtitle .color - .withOpacity(opacity), + .withOpacity(0.5), ), ); } - Widget _buildLastMessage(BuildContext context, double opacity) { + Widget _buildLastMessage(BuildContext context) { return StreamBuilder>( stream: channel.state.messagesStream, initialData: channel.state.messages, @@ -189,7 +188,7 @@ class ChannelPreview extends StatelessWidget { .channelPreviewTheme .subtitle .color - .withOpacity(opacity), + .withOpacity(0.5), ), ); },