From 8857718709508d059f3cebe8c80126a88ac0f3cb Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 2 Nov 2025 23:56:48 +0800 Subject: [PATCH] :bug: Fix compose toolbar safe area issue --- lib/widgets/post/compose_card.dart | 1 + lib/widgets/post/compose_toolbar.dart | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/widgets/post/compose_card.dart b/lib/widgets/post/compose_card.dart index 3028762e..face3388 100644 --- a/lib/widgets/post/compose_card.dart +++ b/lib/widgets/post/compose_card.dart @@ -423,6 +423,7 @@ class PostComposeCard extends HookConsumerWidget { state: composeState, originalPost: originalPost, isCompact: true, + useSafeArea: isContained, ), ), ), diff --git a/lib/widgets/post/compose_toolbar.dart b/lib/widgets/post/compose_toolbar.dart index 8b817d55..ba97c8a9 100644 --- a/lib/widgets/post/compose_toolbar.dart +++ b/lib/widgets/post/compose_toolbar.dart @@ -14,12 +14,14 @@ class ComposeToolbar extends HookConsumerWidget { final ComposeState state; final SnPost? originalPost; final bool isCompact; + final bool useSafeArea; const ComposeToolbar({ super.key, required this.state, this.originalPost, this.isCompact = false, + this.useSafeArea = false, }); @override @@ -200,7 +202,12 @@ class ComposeToolbar extends HookConsumerWidget { ), ), ], - ).padding(horizontal: 8, vertical: 4), + ).padding( + horizontal: 8, + top: 4, + bottom: + useSafeArea ? MediaQuery.of(context).padding.bottom + 4 : 4, + ), ), ), );