🐛 Optimizing styling of chat

This commit is contained in:
LittleSheep 2025-01-08 17:37:16 +08:00
parent d699cac9b1
commit 4edfa7fd50
4 changed files with 8 additions and 3 deletions

View File

@ -236,7 +236,7 @@ class _ChatScreenState extends State<ChatScreen> {
'alias': channel.alias,
},
).then((value) {
if (value == true) _refreshChannels();
if (mounted) _refreshChannels();
});
},
);

View File

@ -128,6 +128,9 @@ class ChatMessage extends StatelessWidget {
if (isCompact) const Gap(8),
if (data.preload?.quoteEvent != null)
StyledWidget(Container(
constraints: BoxConstraints(
maxWidth: 480,
),
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(8)),
border: Border.all(

View File

@ -101,7 +101,9 @@ class ChatMessageInputState extends State<ChatMessageInput> {
},
);
setState(() {
_attachments[i] = PostWriteMedia(item);
});
}
} catch (err) {
if (!mounted) return;

View File

@ -49,7 +49,7 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer> {
backgroundColor: backgroundColor,
selectedIndex: nav.currentIndex,
children: [
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS))
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS) && !cfg.drawerIsExpanded)
Container(
decoration: BoxDecoration(
border: Border(