feat: Add a mute indicator UI and make the star icon interactive on the chat screen.
This commit is contained in:
@@ -30,6 +30,7 @@ class _ChatScreenState extends ConsumerState<ChatScreen>
|
||||
final FocusNode _messageFocusNode = FocusNode();
|
||||
bool _isComposing = false;
|
||||
bool _isMuted = false;
|
||||
bool _isStarred = false;
|
||||
int _previousMessageCount = 0;
|
||||
|
||||
final SocketService _socket = SocketService();
|
||||
@@ -520,13 +521,33 @@ class _ChatScreenState extends ConsumerState<ChatScreen>
|
||||
),
|
||||
],
|
||||
),
|
||||
// Mute indicator
|
||||
if (_isMuted)
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 3),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.primaryDark.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.volume_off_rounded, size: 14, color: AppColors.primaryDark.withValues(alpha: 0.6)),
|
||||
const SizedBox(width: 2),
|
||||
Text('Muted', style: TextStyle(fontSize: 10, color: AppColors.primaryDark.withValues(alpha: 0.6), fontFamily: 'SourceSerif4')),
|
||||
],
|
||||
),
|
||||
),
|
||||
// Star icon
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 4),
|
||||
child: Icon(
|
||||
Icons.star_rounded,
|
||||
size: 24,
|
||||
color: AppColors.accentOrange,
|
||||
GestureDetector(
|
||||
onTap: () => setState(() => _isStarred = !_isStarred),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(right: 4),
|
||||
child: Icon(
|
||||
_isStarred ? Icons.star_rounded : Icons.star_outline_rounded,
|
||||
size: 24,
|
||||
color: _isStarred ? AppColors.accentOrange : AppColors.primaryDark.withValues(alpha: 0.4),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user