Hotfix new announcements feature causing gray chat

This commit is contained in:
tommyxchow 2022-04-03 20:18:05 -04:00
parent e61485c780
commit 433f14a26b
2 changed files with 13 additions and 2 deletions

View file

@ -117,7 +117,18 @@ class ChatMessage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(ircMessage.tags['system-msg']!),
if (ircMessage.tags.containsKey('system-msg')) Text(ircMessage.tags['system-msg']!),
if (ircMessage.tags.containsKey('msg-id') && ircMessage.tags['msg-id'] == 'announcement')
Row(
children: const [
Icon(Icons.announcement),
SizedBox(width: 5.0),
Text(
'Announcement',
style: TextStyle(fontWeight: FontWeight.bold),
),
],
),
const SizedBox(height: 5.0),
if (ircMessage.message != null)
Observer(

View file

@ -57,7 +57,7 @@ class _ChatSettingsState extends State<ChatSettings> {
SwitchListTile.adaptive(
isThreeLine: true,
title: const Text('Readable Name Colors'),
subtitle: const Text('Adjusts the lightness value of overly bright/dark names.'),
subtitle: const Text('Adjusts the lightness value of overly bright or dark names.'),
value: settingsStore.useReadableColors,
onChanged: (newValue) => settingsStore.useReadableColors = newValue,
),