From 17f73d88d79ca2e13944e0b0ce55d06229074c4d Mon Sep 17 00:00:00 2001 From: Divyanshu Agrawal Date: Mon, 25 May 2020 14:08:25 +0530 Subject: [PATCH 1/3] sharing: Add UI to receive and handle shares from other apps. This completes most of the implementation of #117. To enable the feature as it currently exists, it's enough to uncomment the commented-out bit of the manifest, so that Zulip appears in the "sharing" UI when attempting to share something from another app. The reason we don't yet enable/advertise the feature is that there are some blocker bugs -- most notably, it crashes when you try to use it. That didn't use to happen, on a branch based on an older version from master, but it does now after rebasing. (The error message suggests it's probably related to our recent upgrades of the RN version we use.) The 'react-navigation' code was suggested by Chris Bobbe. Suggested-in-part-by: Chris Bobbe --- android/app/src/main/AndroidManifest.xml | 12 +- src/boot/AppEventHandlers.js | 5 + src/nav/AppNavigator.js | 2 + src/nav/navActions.js | 4 + src/sharing/ChooseRecipientsScreen.js | 44 +++++ src/sharing/ShareToPm.js | 225 +++++++++++++++++++++ src/sharing/ShareToStream.js | 240 +++++++++++++++++++++++ src/sharing/SharingScreen.js | 82 ++++++++ src/sharing/index.js | 53 +++++ src/types.js | 21 ++ static/translations/messages_en.json | 7 + 11 files changed, 685 insertions(+), 10 deletions(-) create mode 100644 src/sharing/ChooseRecipientsScreen.js create mode 100644 src/sharing/ShareToPm.js create mode 100644 src/sharing/ShareToStream.js create mode 100644 src/sharing/SharingScreen.js create mode 100644 src/sharing/index.js diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 79251b52575..0d85b21edaf 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -41,22 +41,14 @@ - - - - -->