From 77fdecc748690f8f760d9190b374bc9ef61c99a0 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 30 Sep 2021 16:21:36 -0700 Subject: [PATCH 1/4] Upgrade libcwtch-go --- LIBCWTCH-GO.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LIBCWTCH-GO.version b/LIBCWTCH-GO.version index fc6ed486..1df52e42 100644 --- a/LIBCWTCH-GO.version +++ b/LIBCWTCH-GO.version @@ -1 +1 @@ -v1.3.0-2021-09-30-20-24 \ No newline at end of file +v1.3.0-3-gfcc9d71-2021-09-30-23-09 \ No newline at end of file From 222e2c6f3647911a2922f132d89abec1c937db85 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Fri, 1 Oct 2021 07:52:49 -0700 Subject: [PATCH 2/4] Prevent Sharing Files on Android for Now --- .../kotlin/im/cwtch/flwtch/FlwtchWorker.kt | 6 +++-- lib/views/messageview.dart | 24 ++++++++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt b/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt index d18bb0d9..f4ef3152 100644 --- a/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt +++ b/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt @@ -231,8 +231,10 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) : val filepath = (a.get("filepath") as? String) ?: "" val manifestpath = (a.get("manifestpath") as? String) ?: "" val filekey = (a.get("filekey") as? String) ?: "" - Log.i("FlwtchWorker::DownloadFile", "DownloadFile("+filepath+", "+manifestpath+")") - Cwtch.downloadFile(profile, handle, filepath, manifestpath, filekey) + // FIXME: Prevent spurious calls by Intent + if (profile != "") { + Cwtch.downloadFile(profile, handle, filepath, manifestpath, filekey) + } } "CheckDownloadStatus" -> { val profile = (a.get("ProfileOnion") as? String) ?: "" diff --git a/lib/views/messageview.dart b/lib/views/messageview.dart index d279db17..c8484b84 100644 --- a/lib/views/messageview.dart +++ b/lib/views/messageview.dart @@ -83,17 +83,19 @@ class _MessageViewState extends State { var appBarButtons = []; if (Provider.of(context).isOnline()) { - appBarButtons.add(IconButton( - icon: Icon(Icons.attach_file, size: 24), - tooltip: AppLocalizations.of(context)!.tooltipSendFile, - onPressed: _showFilePicker, - )); - appBarButtons.add(IconButton( - icon: Icon(CwtchIcons.send_invite, size: 24), - tooltip: AppLocalizations.of(context)!.sendInvite, - onPressed: () { - _modalSendInvitation(context); - })); + if (Platform.isAndroid == false) { + appBarButtons.add(IconButton( + icon: Icon(Icons.attach_file, size: 24), + tooltip: AppLocalizations.of(context)!.tooltipSendFile, + onPressed: _showFilePicker, + )); + } + appBarButtons.add(IconButton( + icon: Icon(CwtchIcons.send_invite, size: 24), + tooltip: AppLocalizations.of(context)!.sendInvite, + onPressed: () { + _modalSendInvitation(context); + })); } appBarButtons.add(IconButton( icon: Provider.of(context, listen: false).isGroup == true ? Icon(CwtchIcons.group_settings_24px) : Icon(CwtchIcons.peer_settings_24px), From 0cdf18df79f24a5d3abdfaadf375b86374f1b06d Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Fri, 1 Oct 2021 07:57:29 -0700 Subject: [PATCH 3/4] fmt --- lib/views/messageview.dart | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/views/messageview.dart b/lib/views/messageview.dart index c8484b84..ea84f169 100644 --- a/lib/views/messageview.dart +++ b/lib/views/messageview.dart @@ -84,18 +84,18 @@ class _MessageViewState extends State { var appBarButtons = []; if (Provider.of(context).isOnline()) { if (Platform.isAndroid == false) { - appBarButtons.add(IconButton( - icon: Icon(Icons.attach_file, size: 24), - tooltip: AppLocalizations.of(context)!.tooltipSendFile, - onPressed: _showFilePicker, - )); - } appBarButtons.add(IconButton( - icon: Icon(CwtchIcons.send_invite, size: 24), - tooltip: AppLocalizations.of(context)!.sendInvite, - onPressed: () { - _modalSendInvitation(context); - })); + icon: Icon(Icons.attach_file, size: 24), + tooltip: AppLocalizations.of(context)!.tooltipSendFile, + onPressed: _showFilePicker, + )); + } + appBarButtons.add(IconButton( + icon: Icon(CwtchIcons.send_invite, size: 24), + tooltip: AppLocalizations.of(context)!.sendInvite, + onPressed: () { + _modalSendInvitation(context); + })); } appBarButtons.add(IconButton( icon: Provider.of(context, listen: false).isGroup == true ? Icon(CwtchIcons.group_settings_24px) : Icon(CwtchIcons.peer_settings_24px), From c174f2f2933071b6e71902eafa1dc0a623cea2a1 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Fri, 1 Oct 2021 08:45:20 -0700 Subject: [PATCH 4/4] pubspec version bump --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index d0ffcee0..daeb24ea 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.2.0+19 +version: 1.3.0+20 environment: sdk: ">=2.12.0 <3.0.0"