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();
|
final FocusNode _messageFocusNode = FocusNode();
|
||||||
bool _isComposing = false;
|
bool _isComposing = false;
|
||||||
bool _isMuted = false;
|
bool _isMuted = false;
|
||||||
|
bool _isStarred = false;
|
||||||
int _previousMessageCount = 0;
|
int _previousMessageCount = 0;
|
||||||
|
|
||||||
final SocketService _socket = SocketService();
|
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
|
// Star icon
|
||||||
Padding(
|
GestureDetector(
|
||||||
padding: const EdgeInsets.only(right: 4),
|
onTap: () => setState(() => _isStarred = !_isStarred),
|
||||||
child: Icon(
|
child: Padding(
|
||||||
Icons.star_rounded,
|
padding: const EdgeInsets.only(right: 4),
|
||||||
size: 24,
|
child: Icon(
|
||||||
color: AppColors.accentOrange,
|
_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