remove opacity difference for unread channels

This commit is contained in:
Salvatore Giordano
2020-07-08 10:45:26 +02:00
parent 0398908bd6
commit 8b0bb0f3b2
+4 -5
View File
@@ -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<List<Message>>(
stream: channel.state.messagesStream,
initialData: channel.state.messages,
@@ -189,7 +188,7 @@ class ChannelPreview extends StatelessWidget {
.channelPreviewTheme
.subtitle
.color
.withOpacity(opacity),
.withOpacity(0.5),
),
);
},