~emersion/goguma-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] composer: Enclose modal sheet in SafeArea

Details
Message ID
<20240301122654.11240-1-virgule@jeanthomas.me>
DKIM signature
pass
Download raw message
Patch: +37 -35
Prevents usability issue on phones (eg. iPhone) where some
system UI elements are drawn over the app UI.
---
 lib/widget/composer.dart | 72 +++++++++++++++++++++-------------------
 1 file changed, 37 insertions(+), 35 deletions(-)

diff --git a/lib/widget/composer.dart b/lib/widget/composer.dart
index 2a26a5b..c173f27 100644
--- a/lib/widget/composer.dart
+++ b/lib/widget/composer.dart
@@ -646,42 +646,44 @@ class ComposerState extends State<Composer> {
				onPressed: () {
					showModalBottomSheet<void>(
						context: context,
						builder: (context) => Column(mainAxisSize: MainAxisSize.min, children: [
							if (_locationServiceAvailable) ListTile(
								title: Text('Share my location'),
								leading: Icon(Icons.my_location),
								onTap: () {
									Navigator.pop(context);
									_runAddMenuTask(_shareLocation);
								}
							),
							if (client.isupport.filehost != null) ListTile(
								title: Text('Share a picture'),
								leading: Icon(Icons.add_photo_alternate),
								onTap: () async {
									Navigator.pop(context);
									var file = await ImagePicker().pickImage(source: ImageSource.gallery);
									if (file != null) {
										_runAddMenuTask(() async {
											await _uploadFile(file);
										});
						builder: (context) => SafeArea(
							child: Column(mainAxisSize: MainAxisSize.min, children: [
								if (_locationServiceAvailable) ListTile(
									title: Text('Share my location'),
									leading: Icon(Icons.my_location),
									onTap: () {
										Navigator.pop(context);
										_runAddMenuTask(_shareLocation);
									}
								},
							),
							if (client.isupport.filehost != null) ListTile(
								title: Text('Share a file'),
								leading: Icon(Icons.upload_file),
								onTap: () async {
									Navigator.pop(context);
									var file = await openFile(confirmButtonText: 'Upload');
									if (file != null) {
										_runAddMenuTask(() async {
											await _uploadFile(file);
										});
									}
								},
							),
						]),
								),
								if (client.isupport.filehost != null) ListTile(
									title: Text('Share a picture'),
									leading: Icon(Icons.add_photo_alternate),
									onTap: () async {
										Navigator.pop(context);
										var file = await ImagePicker().pickImage(source: ImageSource.gallery);
										if (file != null) {
											_runAddMenuTask(() async {
												await _uploadFile(file);
											});
										}
									},
								),
								if (client.isupport.filehost != null) ListTile(
									title: Text('Share a file'),
									leading: Icon(Icons.upload_file),
									onTap: () async {
										Navigator.pop(context);
										var file = await openFile(confirmButtonText: 'Upload');
										if (file != null) {
											_runAddMenuTask(() async {
												await _uploadFile(file);
											});
										}
									},
								),
							]),
						),
					);
				},
			);
-- 
2.39.3 (Apple Git-145)
Details
Message ID
<8HMy3LQ-TeYNstZt7B-uFoWVCQCilY8MlZT-xKqebakOXu90I8XWckOLM3zzpGSBerib5ZKBCQ8sPyxs49pwjmmR1_hOZX-qHQf-HzpT6fE=@emersion.fr>
In-Reply-To
<20240301122654.11240-1-virgule@jeanthomas.me> (view parent)
DKIM signature
pass
Download raw message
Pushed, thanks!
Reply to thread Export thread (mbox)