🐛 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, 'alias': channel.alias,
}, },
).then((value) { ).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 (isCompact) const Gap(8),
if (data.preload?.quoteEvent != null) if (data.preload?.quoteEvent != null)
StyledWidget(Container( StyledWidget(Container(
constraints: BoxConstraints(
maxWidth: 480,
),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(8)), borderRadius: const BorderRadius.all(Radius.circular(8)),
border: Border.all( border: Border.all(

View File

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

View File

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