Commit graph

136 commits

Author SHA1 Message Date
Miguel Alatzar
5e5d3abd79 [MM-17145] [MM-18947] [MM-17110] [MM-14926] [MM-18646] Use patched v2.0.6 of react-native-notifications and fix Android badge number (#3382)
* Refactor custom push notification code

* Use react-native-notifications 2.0.6 and patch for scheduled notifs

* Fix patch

* iOS changes

* Fix delete

* Fix setting of badge number on Android

* Undo Reflect removal

* Undo removal of didReceiveRemoteNotification

* Use min importance for push notifs received while app is active

* Correctly set badge number after push notificaiton reply

* Fix tests

* Localize reply action text

* Add getDeliveredNotifications

* Fix identifier check and failing test

* Fix local push notif test for Android > 9
2019-10-22 21:18:59 +03:00
Ewe Tek Min
0d1fd78263 MM-9599 Paste image from clipboard (#3084)
* Show image paste menu

* Get pasted image

* Add more info for file

* Add custom text input and add extension

* Dismiss contextual menu after paste image

* Group image info together

* Add max file check

* Fix max file size text

* Add PropTypes

* Add support for gif and tiff

* add onchange null check

* Use onPaste event

* Move get image info logic

* Clean up listener when no observer

* Add android upload

* Copy file from google docs

* Clean up file after upload

* Prevent text pasted in textbox if it's content uri

* Rename paste file thread

* Move on paste listener logic

* Remove the redundant data in ios

* Get realpath of item

* Clean up

* Only download for image

* Rename to custom text input

* Update RNPasteableEditTextOnPasteListener.java

* Handle for download image failed

* Fix eslint

* Fix test

* Allow multiple images to be pasted

* Remove additional null check

* Add managed control for Android

* Disable only copy, cut and paste

* Accept image in Android edit text

* Add comment for custom text input

* Do not upload when more than max file

* Stop uplaod when exceed file size

* Fix crash when clip data is null

* Return error to JS

* Move download file logic

* Remove console

* Add some tests

* Add test for handleUploadImages

* Add test for file_upload_item

* Use ImageCacheManager to cache remote images

* Fix crashes from one note

* Remove commented code

* Update test
2019-09-16 20:10:14 -03:00
Elias Nahum
19e6b2a00e
[MM-18362] Sidebar improvements (#3223)
* sidebar lists displays past bottom safe area insets

* Sidebar animation speed

* Sidebar improvements

* Add status icons and avatars to mattermost font

* Bot icon the same size as other channel icons

* improvements to the channel badge

* Badge color and border

* More precision when showing more unread above

* Improve GM icon

* Fix badge on team sidebar

* Align channel sidebar badges

* alignments

* Fix tests

* Remove unnecessary isLandscape in main sidebar connector
2019-09-16 13:17:48 -03:00
Harrison Healey
4bb94195f1 MM-18465 Add proper flags when opening settings (#3242)
* MM-18465 Add proper flags when opening settings

* Fix undefined setPerformingAuthentication Function in emm_provider.
2019-09-11 23:57:07 -04:00
Ewe Tek Min
f6c9c950c5 MM-12879 Fix iOS photo/camera permission denied prompt (#2904)
* Update Github issues link

* Update GH issue to permalink

* Add missing comma

* Fix ios not prompting alert after denied photo or camera permission

* Rename permission var

* Update text

* Change to correct text

* Update text for attachement button

* Update text for image_preview

* Fix test

* Integrate react-native-android-open-settings for storage permission denied

* Move react-native-android-open-settings

* Change all default permission denied message

* Revert "Merge remote-tracking branch 'upstream/master'"

This reverts commit 65187f8f98de4943103bdab4b39bd7e1ebd5a220, reversing
changes made to daca425676503a57936a5539b5b5fa68a6c5427e.

* Revert "Revert "Merge remote-tracking branch 'upstream/master'""

This reverts commit c82fa628d5addc1262353539c32b76c6a1130e83.

* Add NSPhotoLibraryAddUsageDescription description

* Fix bad import

* Lazy load react-native-android-open-settings

* Fix indent
2019-09-11 01:18:53 -03:00
Elias Nahum
223bd64a43
[MM-18349] Post menu delay animation speed and haptic feedback (#3214)
* Animate backdrop opacity in slide up panel

* Set delayLongPress to 75ms for post

* Add haptic feedback on slide up of post options

* Ease in slide up animation

* Add haptic feedback to android

* reduce long press delay for post options menu

* helper function for haptic feedback

* Add haptic feedback when opening post options menu

* Patch haptic feedback RN module on Android

* Fix tests

* Move hapticFeedback call to SlideUpPanel

* Decrease long press time for reaction
2019-09-07 07:45:07 +09:00
Miguel Alatzar
3eda53d49a [MM-17970] Check for valid server URL (#3152)
* Check for valid server URL

* Fallback to parsing token
2019-08-21 19:02:58 -04:00
Elias Nahum
90ac092443
Load Android WebView package instead of module (#3053) 2019-07-29 09:15:40 -04:00
Elias Nahum
b8af8a3860
Lazy android native modules (#2973)
* Lazy loading Android modules

* Remove react-native-bottom-sheet

* Remove comments

* npm audit fix

* Update rnn-v2 modals

* audit fix

* Fix tests
2019-07-17 11:06:21 -04:00
Miguel Alatzar
c321c773c3 Merge branch 'master' into rnn-v2 2019-07-12 09:01:33 -07:00
Miguel Alatzar
c30bc8bfea Check for null config 2019-07-12 08:56:36 -07:00
Elias Nahum
df3a3eb39f Fix android crash on Android O & P after upgrading target to 28 (#2968) 2019-07-10 10:31:13 -04:00
Miguel Alatzar
51aac1e6e7 Merge branch 'master' into rnn-v2 2019-07-02 18:15:19 -07:00
Elias Nahum
89b96d51db MM-16430 refactor app entry point (#2924)
* MM-16430 refactor app entry point

* iOS Extensions to use session token from KeyChain

* Remove token from general credentials entity

* Fix mattermost-managed.ios to return the cachedConfig

* Migrate server based keychain for android push notifications

* remove unneeded async

* Remove unneeded android InitializationModule
2019-06-26 15:21:20 -04:00
Elias Nahum
c121f66526 MM-16463 Fix replying from push notification to a message in a thread (#2927) 2019-06-26 16:59:07 +08:00
Elias Nahum
3f925df9d9 MM-16392 Split view support & hide sidebar on tablets (#2898) 2019-06-21 14:10:30 -04:00
Miguel Alatzar
7f30ebbd39 Return if message is null (#2895) 2019-06-18 17:09:52 -04:00
Miguel Alatzar
0f948f650d Merge branch 'master' into rnn-v2 2019-06-18 09:58:35 -07:00
Miguel Alatzar
cbe0c719ac [MM-15874] Add native code to support RNN v2 on Android (#2855)
* Remove fix for MM-9233

* MM-15774 Add native code to support RNN v2 on iOS

* Android changes for RNN v2 upgrade

The activity visibility handling of NotificationsLifecycleFacade
is no longer needed in RNN v2. I've moved the lifecycle callbacks
we use for handling managed config into
ManagedActivityLifecycleCallbacks.java and registered them in
MainApplication's onCreate. Also, I've moved and updated the
loading and getting of the managed config into MainApplication

* Update moduleNames and modulePaths

* Use TAG in restrictionsReceiver

* Set launch screen onCreate

* Comment out registerActivityLifecycleCallbacks for now

* Remove setSoftInputMode call as it's handled in the manifest

* Remove clearHostOnActivityDestroy as that fix is no longer needed

* Rename to canLaunchEntry

* Remove replacement of super.onBackPressed()

* Remove react-navigation from packager files
2019-06-12 15:26:03 -04:00
Elias Nahum
0bb2522b5e MM-16281 Fix regression on android push notification messages (#2879) 2019-06-12 15:10:06 -04:00
Elias Nahum
e16d955527
MM-15959 disable android firebase analytics (#2854) 2019-06-03 09:48:18 -04:00
Harrison Healey
3503025e53 MM-15643 Better close app when checking for pin code (#2846) 2019-05-30 11:46:35 -07:00
Harrison Healey
6e099d6a21 MM-15643 Send user to settings when passcode is required (#2836)
* MM-15643 Send user to settings when passcode is required

* Allow access to the managed config in the iOS extensions
2019-05-27 19:38:32 -04:00
Elias Nahum
5bf96272ae
Notification receipt delivery for Android and iOS (#2755)
* Notification receipt delivery for Android and iOS

* Update Fastlane with iOS notification service extension

* User JSONObject to build response
2019-05-15 12:45:26 -04:00
Elias Nahum
f36ee37402
Upgrade to RN 0.59.6 and dependencies (#2777)
* Upgrade to RN 0.59.6 and dependencies

* Remove channel loader unused style

* Update to the latest netInfo that fixes a crash

* Do not set default timezone with moment

* Use RN 0.59.8
2019-05-13 13:33:18 -04:00
Saturnino Abril
e086d66ec2
[MM-13955] Add telemetry for Android (#2719)
* add markers for Android profiling

* update per comments

* Remove beta build flag

* update per comment, latest change on telemetry server and others

* rebase and fix merge conflicts, and update per comments

* update commit hash of mattermost-redux
2019-05-08 00:23:59 +08:00
Elias Nahum
5ce9208d32 MM-14958 Scroll to bottom when posting a new message (#2761) 2019-05-07 13:28:16 +05:30
Elias Nahum
a16c98b34e MM-15428 Return empty object for native managed configuration when not set (#2770) 2019-05-06 09:20:08 -07:00
Harrison Healey
0708a53d09
MM-15284 Disable allowBackup on Android (#2756) 2019-05-01 09:39:06 -04:00
Joram Wilander
df2ecf3409
Add native module to reset TextInput to fix bad cursors in some Android keyboards (#2753) 2019-05-01 09:27:21 -04:00
Elias Nahum
fee9a96a11 MM-14885 Android use sender_name in push notifications (#2747) 2019-04-30 15:33:01 -07:00
Mohammad Parvin
46e6a14c73 Allow user to install mattermost on sd card (#2731)
Cannot install Mattermost when there is no enough space in internal memory, So when add this line
android:installLocation="auto" 
to the manifest file user can install Mattermost on the sd card.
https://developer.android.com/guide/topics/data/install-location
2019-04-30 16:45:18 -04:00
kmandagie
b3a586fd57 [MM-12599] Implement assets for Adaptive icons (#2663) 2019-04-26 13:08:15 -07:00
Miguel Alatzar
fab556c4eb Check for null activity before calling finish (#2738) 2019-04-25 09:23:16 -04:00
Peter Dave Hello
d5a0b50d9a Optimize png image with zopflipng lossless compression (#2682) 2019-04-22 21:57:49 -04:00
Miguel Alatzar
50a83b63fa Remove package name from push notification content (#2700) 2019-04-08 05:23:53 +08:00
Miguel Alatzar
6aaaaef09c
[MM-14871] Fix extraction of sender name for push notifications (#2691)
* Return empty string for sender name when not found
2019-04-03 18:39:28 -07:00
Miguel Alatzar
531a743853
[MM-14866] Fix app crash due to parseInt call on null and display test notification message (#2690)
* Call setNumber on notification only if badge is not null

* Move setNumber call

* Add bundle to empty list
2019-04-03 10:15:05 -07:00
Elias Nahum
1777a4f750
MM-14316 Android Notifications and reply to notifications from native code (#2653)
* MM-14316 Android Notifications and reply to notifications from native code

* Feedback review

* Fix typo

* setBadgeIconType only for Android 8+
2019-03-20 16:39:36 -03:00
John Senner
771e5cd53b Change comment to more common xml format (#2621) 2019-03-07 09:37:44 -05:00
Miguel Alatzar
10442444b8
Ensure data has url key before attempting upload (#2609) 2019-02-28 10:58:54 -08:00
Miguel Alatzar
c0bae1f5a9
Check for null uri prior to getting path to shared content (#2607) 2019-02-28 10:57:04 -08:00
Elias Nahum
88f5848850
Dependencies update (#2576)
* Dependencies update

* Fix WebView

* Update to RN 0.58.5 and include the WebSocket fix

* Update react-native-video

* Fix RNFetchBlob
2019-02-20 17:17:04 -03:00
Elias Nahum
7df9711afa
Prevent the app from crashing when file mime type is null (#2582) 2019-02-20 16:47:55 -03:00
Elias Nahum
2184696e65
post menu and file attachments (#2414)
* post menu and file attachments

* Fix post list selector test

* Use new Gesture handler to avoid gesture conflicts in post menu and reaction list

* Allow reaction list to scroll the header on Android

* Feedback review

* Add some comments

* Fix eslint
2018-12-05 14:59:41 -03:00
Elias Nahum
c54738481f
Android: Fix crash when attaching files from the downloads folder (#2390) 2018-11-28 15:06:23 -03:00
Elias Nahum
1eb046a7fd Android/iOS leave notifications until channel is read (#2321)
* iOS clear notifications from a specific channel when clear push notification received

* Android leave notifications until channel is read

* use redux-connect currentChannelId in network indicator
2018-11-19 13:20:44 -05:00
Elias Nahum
68a3825d95
Update dependencies (#2316) 2018-11-18 17:54:06 -03:00
Elias Nahum
fb51e38733
Replace WebView with React Native Community WebView (#2340) 2018-11-16 13:28:54 -03:00
Elias Nahum
0af947476e
Allow user system CA's for Android (#2301) 2018-11-02 18:05:32 -03:00