From 4d35df36dbc30754fe3cc129260f98713be7305e Mon Sep 17 00:00:00 2001
From: vjrj <vjrj@comunes.org>
Date: Wed, 5 Apr 2023 23:32:40 +0200
Subject: [PATCH] Show share in android and fix assets in android too

---
 lib/ui/ui_helpers.dart | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/ui/ui_helpers.dart b/lib/ui/ui_helpers.dart
index 7dbc0484..930c10af 100644
--- a/lib/ui/ui_helpers.dart
+++ b/lib/ui/ui_helpers.dart
@@ -197,7 +197,7 @@ ListTile contactToListItem(Contact contact, int index, BuildContext context,
       trailing: trailing);
 }
 
-bool showShare() => onlyInDevelopment;
+bool showShare() => onlyInDevelopment || !kIsWeb;
 
 bool get onlyInDevelopment => !inProduction;
 
@@ -207,7 +207,10 @@ bool get onlyInProduction => kReleaseMode;
 
 bool get inProduction => onlyInProduction;
 
-String assets(String str) => (kIsWeb && kReleaseMode) ? 'assets/$str' : str;
+String assets(String str) =>
+    (kIsWeb && kReleaseMode) || (!kIsWeb && Platform.isAndroid)
+        ? 'assets/$str'
+        : str;
 
 Future<Directory?> getAppSpecificExternalFilesDirectory(
     [bool ext = false]) async {
-- 
GitLab