Commit Graph

41 Commits

Author SHA1 Message Date
Emilio Rodriguez
0b98d82bfa Mm 10601 - Use Enter Key to send message on Hardware Keyboards (#3760)
* Reacting to shift-enter events on iOS

* moving keyEvent logic to handleHardwareEnterPress

* configured android to work with keyEvents

* using dispatchKeyEvent instead of onKeyUp

* using react-native-hw-keyboard-event

* cleanup

* updated package name

* update package name

* using react-native-hw-keyboard-event v0.0.2

* reverted cocoapods version change

* Documentation

* fix detection of Shift-Enter on android

* simplify dispatchKeyEvent()

* fix for stacked hardware keyboard events

* Update android/app/src/main/java/com/mattermost/rnbeta/MainActivity.java

Co-Authored-By: Miguel Alatzar <migbot@users.noreply.github.com>

* simplify dispatchKeyEvent

* removed yarn.lock

* using react-native-hw-keyboard-event v0.0.4

* Using ACTION_UP instead of ACTION_DOWN

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-02-04 09:34:14 -07:00
Miguel Alatzar
d25561bb83 [MM-21888] Don't use localPath when it's the share extension cache dir (#3845)
* Don't use localPath when it's the share extension cache dir

* Move android pasted images to cache image folder

* Use Files.move instead of FileInput / FileOutput stream

* Remove commented code and not needed imports
2020-01-27 13:58:30 -03:00
Elias Nahum
7c09334dc4 Deps update (#3806)
* Dependecy updates

* Update dependencies
2020-01-20 13:20:03 -03:00
Miguel Alatzar
430463822b Use LifecycleEventListener listener for MattermostManagedModule (#3578) 2019-11-20 15:25:53 -07:00
Kaiden Sin
a1c8a4691e [mm 15792] Fix massive app slowdown with many emojis (#3209)
* [MM-16593] [MM-17175] [MM-17164] [MM-17189] [MM-17181] Android - Upgrade to RN 0.60 (#3145)

* Upgrade to react-native 0.60

* Use @sentry/react-native

* Manually link @sentry/react-native

* Address review comments

* Jetify after install

* Call jetify from node_modules

* Run npm install react-native-fast-image --save

* Link react-native-fast-image for Android

* Link react-native-fast-image to iOS Pod

* Replace Image with FastImage in emoji.js and remove redundant caching

* Remove duplicate sentry gradle

* Feedback review

* Remove FastImage and Sentry from the Podfile
2019-11-17 23:34:39 -05:00
Miguel Alatzar
1efb01deda [MM-16593] Upgrade to RN 0.61.2 (#3455)
* [MM-16593] [MM-17175] [MM-17164] [MM-17189] [MM-17181] Android - Upgrade to RN 0.60 (#3145)

* Upgrade to react-native 0.60

* Use @sentry/react-native

* Manually link @sentry/react-native

* Address review comments

* Jetify after install

* Call jetify from node_modules

* [MM-17785] iOS - Upgrade to RN 0.60 (#3153)

* Upgrade to react-native 0.60

* Use @sentry/react-native

* Manually link @sentry/react-native

* Address review comments

* Jetify after install

* Call jetify from node_modules

* Get app building for iOS

* Revert react-native-image-picker upgrade

* Minor version upgrade of react-native-image-picker

* [MM-17142] Convert all string refs to callbacks (#3217)

* Replace string refs

* Fix tests

* Don't use inline functions

* Fix mattermost-redux reversion from master merge

* [MM-18336] Upload Sentry debug symbols only when SENTRY_ENABLED is true (#3227)

* Upgrade @sentry/react-native

* Run Sentry gradle tasks only when enabled

* Upgrade @sentry/react-native and remove extra Sentry build phase

* [MM-17144] Use Hermes (#3226)

* Replace string refs

* Fix tests

* Don't use inline functions

* Fix mattermost-redux reversion from master merge

* Use Hermes

* bundleCommand ram-bundle no longer needed

* Require harmony-reflect only for Android

* Fix failing test

* Path react-native's splitLayoutProps (#3337)

* [MM-18867] [MM-17186] [MM-18866] [MM-19447] [MM-18967] Upgrade to RN 0.61.2 (#3423)

* Upgrade to RN 0.61.2

* Update rn-fetch-blob commit hash

* Update react-native-keyboard-tracking-view commit hash

* Use react-native-youtube with AVPlayer fix

* Fix jest mocks

* Use updated document picker API

* Remove unnecessary linking

* Revert "MM-17759 Add code highlighting (#3072)"

This reverts commit 26b999e885.

* Fix share extension

* Revert "Revert "MM-17759 Add code highlighting (#3072)""

This reverts commit 52aca776b1.

* Address PR reviews

* Rename patch to match version

* Update react-native-youtube patch

* Update dependencies

* Fix RNDocViewer reference

* Update tests and revert to redux-persist 4.10.2

* Revert "Revert "Revert "MM-17759 Add code highlighting (#3072)"""

This reverts commit 5ef383be26.

* Android fixes after dep upgrades

* Use fresco 2.0.0

* Use mattermost forks

* Use React-Core in Mattermost.scheme instead of react

* Remove packager (#3452)

* Remove Pods from source control

* Fix unit tests

* Add new line before entering the keystore in gradle.properties

* set ios as working directory for cocoapods

* Cache cocoapods on circleCI builds

* set ios as working dir

* fix cocoapods cache key

* Unify fastlane and npm dependencies command

* Use package-lock.json checksum for npm cache

* Fix package.json and use the checksum as the cache key

* Fix package.json and use the checksum as the cache key

* changes to circleci.yaml fastlane and removing pods from git

* Fix Mattermost.xcodeproj

* Update coocoapods to 1.7.5 and fix xcode header search paths

* Update package-lock.json

* Remove unused tooltip component

* Fix incorrect ref

* Disable Hermes (#3460)

* Revert "Remove packager (#3452)"

This reverts commit b2a79e184b.

* Disable Hermes :'(

* Update preloaded modules

* Fix packages moduleNames and modulePaths, update snapshots and update mm-redux (ts version)

* remove document picker from modulePaths

* Fix package-lock.json

* Add eslint disable rules
2019-10-28 15:04:24 -07: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
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 65187f8f98, reversing
changes made to daca425676.

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

This reverts commit c82fa628d5.

* 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
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
c30bc8bfea Check for null config 2019-07-12 08:56:36 -07: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
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
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
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
fb51e38733 Replace WebView with React Native Community WebView (#2340) 2018-11-16 13:28:54 -03:00
Elias Nahum
f522df7a2e Refactor postlist to include Android Pie fixes and smoother scrolling (#2161) 2018-09-26 10:43:33 -04:00
Elias Nahum
07f88071c6 Update dependencies (#2040)
* Update dependencies

* Update snapshots
2018-09-17 10:22:38 -03:00
Elias Nahum
bca46b23fe Bump Android build number to 129 (#1980)
* Fix Sentry module in Android MainApplication

* Bump Android build number to 129
2018-08-07 14:29:59 -04:00
Elias Nahum
e07a738dcd Remove orientation dependency (#1698)
* Remove orientation dependency

* Update NOTICES
2018-05-23 10:39:23 -04:00
Chris Duarte
e8712f9199 Cold startup js refactor (#1598)
* Switch to SingleDex and remove all locales

* WIP Mattermost Start Component for lazy loading modules

* Add files changed for native modules

* Add Entry component and app global object

* dispatch setStatusBarHeight for iOS

* Update screen imports

* Include Entry screen

* Refactor app to mattermost.android.js

* Override unnecessary java files

* Fix minor issues in changes

* Display empty state based on user credentials

Also, add proper background theme for empty loading screen

* Add native module constant cache support

* Fix startup theme regression

* Add Keychain support for credentials

* Fix Orientation regression

*  Fix SharedExtension regression

* Emit NATIVE_APP_LAUNCHED across bridge only once during cold start

* Add iOS Support

* Revert to previous implementation of i18n

* Fix styling issues

* Include listener for SERVER_VERSION_CHANGED

* Add SafeAreaView in Entry screen

* Register deviceToken early, in order to get iOS PN Support

* Include StartTimeModule

* Add ReplyFromPush support and remove NATIVE_APP_LAUNCHED listener

* Package native constants in StartTimeModule and avoid bridge calls

* Fix check-style errors

* Code cleanup

* Rename StartTimeModule to InitializationModule

* Remove NavigationApplication

* Documentation and minor changes

* Account for app opening after SharedExtension

* Refactor getIntl to getTranslations

* Move native module constants into it's own forked repos

* Include FetchBlob and DeviceInfo forked repos
2018-05-18 17:13:00 -04:00
Elias Nahum
23ca490525 Ability to upload other file types (#1662) 2018-05-11 18:05:49 -03:00
enahum
cd6fd9017f Fix Android app stuck in splash screen when killed by the OS (#1403) 2018-02-01 09:56:09 -05:00
enahum
676a3c4bda Fix share extension (#1386)
* Remove iOS extension garbage code

* Fix Android Share Extension crash
2018-01-26 18:50:08 -03:00
enahum
926ffe96c5 Android share extension (#1352)
* Android share extension

* Feedback review

* Feedback review
2018-01-17 18:17:02 -03:00
enahum
bc1554e1bd Add Document and Video previews (#1170)
* Video file previewer

* Document preview support

* Fix tests

* Feedback review

* feedback review 2

* feedback review 3

* Fix video_controls copyright

* Fix mime undefined
2017-11-20 18:28:20 -03:00
enahum
9910e3438d Upgrade RN (#1102) 2017-11-07 13:34:39 -03:00
enahum
cc966702fd Improve performance of the channel drawer (#1023)
* Improve performance of the channel drawer

* Feedback review

* Fix makefile

* Feedback review 3

* Fix areStatesEqual

* Fix Android SVG
2017-10-17 10:06:28 -07:00
enahum
e0cfefcdff RN-138 Android notification preferences (#889)
* Fix Android and iOS flow

* Own review

* RN-138 Android notification preferences

* Feedback review

* Feedback review 2
2017-09-13 12:00:16 -03:00
enahum
7aebcbd52e Link Previews (#890)
* Link previews, Image previews and YouTube

* Install cocoapods dependencies
2017-09-12 15:06:19 -03:00
Harrison Healey
3ac7b48adc RN-289 Sentry integration (#873)
* Added JS code for Sentry

* Removed leftover initializeSentry call

* Added SentryOptions config setting

* Added native components for react-native-exception-handler

* Removed default props from ErrorText

* Moved where Sentry is initialized

* Added ios/sentry.properties to .gitignore

* Added linking react-native-sentry to Fastlane

* Fixed fastlane to include newlines in sentry.properties

* Moved to manually link react-native-sentry

* Captured redux errors with Sentry

* Redid how Sentry is optionally compiled to be simpler

* Added Sentry middleware to create redux breadcrumbs

* Added Sentry tags for server version

* Initialize Sentry when testing

* Fixed string replacement for SentryEnabled in fastlane

* Added react-native-sentry to NOTICE.txt
2017-09-01 14:50:17 -03:00
Chris Duarte
220fb588b9 RN-80 Add ability to download files (#866)
* RN-80 Add ability to download files

* Add android permission check and toasts

* Add check for ability to download from config
2017-09-01 12:11:49 -03:00
enahum
cd5fb71681 Appconfig support for iOS and Android (#856)
* AppConfig support for iOS

* AppConfig support for Android

* Fix typo

* Java feedback review
2017-08-18 12:19:00 -04:00
enahum
8afd7fe1cd Renaming the bundle and package Ids (#721)
* Renamed to com.mattermost.rnbeta

* Fastlane for release of com.mattermost.rn

* Do not Publish apps directly to production

* Change ios icon format from jpeg to png
2017-07-07 16:37:05 -04:00