Commit graph

193 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
CJ
ca75e2407b MM-19286 Disable Haptic Feedback (#3402)
* MM-19286 Disable Haptic Feedback

Added a check for iOS version <=9 and for iPhones 5/6/SE versions that don't support haptic feedback.

* MM-19286 Fixed the Fix

Misread the repo for the haptic feedback so fixing the fix.

* MM-19286 Removed line in device.js

Removed line in device.js
2019-10-15 10:32:10 +03:00
Andre Vasconcelos
2f18a0b961 Fixing mention text color (#3372)
* Fixing mention text color

* Updating snapshots

* Update package-lock.json

* Adding highlight link color to other highlight types
2019-10-09 12:44:02 -07:00
Matheus Cardoso
26b999e885 MM-17759 Add code highlighting (#3072)
* Add code highlighting

* Fix code style

* Add unit tests

* Some layout adjustments and code style fixes

* Fix failing test

* Fix typo

* Fixed import style

* Update snapshot

* Fix test

* Remove comment

* Add react-native-syntax-highlighter to NOTICE.txt

* Remove duplicated key

* Fix color issue on Android

* Remove unnecessary style

* Fix top spacing on Android

* Add missing trailing comma

* Revert highlighting in Android full-screen code

* Fix margins on android full-screen code

* Fix top padding on Android full-screen code

* Fix font size on Android full-screen code

* Improve top spacing on iOS full-screen code

* Update package-lock.json

* Update package-lock.json

* Update react-native-syntax-highlighter

* Revert away code highlighting on Android code block
2019-09-30 22:52:45 +08:00
Miguel Alatzar
459801d10b
[MM-17560] Await dismissAllModals and popToRoot prior to calling showSearchModal (#3298)
* Patch react-native-navigation

* Make navigation actions regular functions

* Fix unhandled promise rejection warning

* Missing semicolons

* Mock navigation actions

* Add unit tests for navigation actions

* Place all patches in patches directory

* Fix channel_info snapshot test
2019-09-25 15:23:45 -07:00
Elias Nahum
ecb9bde1fd MM-18740 Sync app badge number when opening a push notification (#3322) 2019-09-25 10:31:44 -07:00
Elias Nahum
114a18c16d
MM-18453 Use native emojis (#3260)
* MM-18453 Use native emojis

* Remove unnecessary else statement

* Add support for builtIn emojis

* Fix Native emojis snapshot tests

* Set emoji text style from StyleSheet

* Remove unneded version check and try/catch

* Add builtIn emojis as custom emojis in emojiPicker

* Simplify emojiPicker lists and fix jumping section headers

* Update snapshots
2019-09-25 12:27:47 +03:00
Andre Vasconcelos
7bd000d794 GH-11952 Adding option to convert public channel to private (#3230)
* Adding option to convert public channel to private

* Added unit tests, feedback alert with error handling, and new alert text

* Ensuring baseProps is never changed between channel_info tests

* Trimming the display_name on alerts

- Preventing extra empty spaces from being displayed on the alerts by trimming the variable
2019-09-23 18:39:15 -07:00
Eric Sethna
2c4764bc88 Update session expiry push notification text (#3211)
* Update session expiry text

* Calculate the session expires in days to be displayed in the local notification

* Feedback review
2019-09-16 12:01:10 -07:00
Devin Binnie
54acc584c3
[MM-18178] Removing caching of failed image loading attempts (#3231) 2019-09-10 12:45:41 -04: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
63066f4365
do not dispatch navigation actions when opening the app from a push notification (#3183) 2019-08-23 22:17:32 -04:00
Elias Nahum
405d3d4677
Update sentry (#3179) 2019-08-23 15:59:20 -04:00
Matheus Cardoso
73518da91e Make keyboard dark on dark themes (iOS only) (#3102)
* Support keyboardAppearance theme parameter

* Change approach of keyboardAppearance to auto-detect

* Fix style

* Update snapshots

* Add unit test for getKeyboardAppearanceFromTheme

* Update snapshot

* Fix failing test
2019-08-23 13:18:05 -04:00
Miguel Alatzar
ffbae7589f Apply setNavigatorStyles to all navigation components (#3121) 2019-08-15 02:00:21 +08:00
Elias Nahum
e87858d7af Various fixes (#3078)
* MM-17588 Remove navigation component from stack

* MM-175986 Fix Clock Display Settings on iOS

* Fix markdown and team icon currentServerUrl

* Fix closing permalink logs out the user

* Fix file attachment document ref

* Fix applyTheme when changing a theme in the app

* Feedback review

* remove / when fetching the image on the markdown table on relative paths
2019-08-08 22:28:07 +08:00
Miguel Alatzar
71e56120eb
[MM-17431] Remove flex for horizontalRule (#3079)
* Remove flex for horizontalRule

* Fix snapshot tests
2019-08-08 07:05:16 -07:00
Elias Nahum
f1ef6920f3
MM-17100 setCSRFFromCookie with subpath support (#3035) 2019-07-25 07:16:37 -04:00
Miguel Alatzar
ebe8d45711
[MM-16816] Parse source URI (#3026)
* Parse source URI

* Revert "Parse source URI"

This reverts commit 1cf421c9b9897e46881685aabebb793ad6ff4c07.

* Pass imageUri instead of defaultSource to ProgressiveImage

* Parse source URI in ImageCacheManager
2019-07-24 07:59:06 -07:00
Miguel Alatzar
76b4bf8262
[MM-14923] Add channel_id to failed push notification reply (#3014)
* Add channel_id to failed push notification reply

* Fix typo
2019-07-22 14:57:40 -07:00
Jesús Espino
ee93e4fa59
Adding guest accounts feature (#2990)
* MM-15059: Restict the permissions for guests (#2791)

* MM-15057: Adding guest badge to identify guest users (#2774)

* MM-15057: Adding guest badge to identify guest users

* Adding Guest tags in the channel title

* Adding i18n translations

* Adding DM and GM guest warnings

* Fixing check-style

* Adding and fixing tests

* Adding i18n text

* Only showing the subtitle when there is enough space

* Addressing new design changes

* Fixing eslint

* Addressing PR comments

* Moving getChannelStats to the handleSelectChannel action

* Adding the guest info in android landscape channel headers

* simplified the guest warning text generation

* Fixing i18n

* Fixing leaving channel behavior for guests (#2989)

* Fixing leaving channel behavior for guests

* Fixing tests and adding a new one

* fixing typo

* Addressing PR comments

* Addressing PR comments

* Fixing tests
2019-07-22 22:14:39 +02: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
5eee2b7652
[MM-16139] [MM-16140] [MM-16141] Update the remaining screens/components (#2920)
* Update screens

* Update login tests

* Remove done

* Fix failing tests

* Update screens and components

* Check styles fix

* Update tests

* Prevent setState call after component unmounts

* Add empty setButtons func to dummy navigator

* Remove platform check

* Remove Platform import

* Update react-native-navigation version

* Add separate showModalOverCurrentContext function

* check-style fixes

* Remove overriding of AppDelegate's window

* Fix modal over current context animation

* Add showSearchModal navigation action

* Check-style fix

* Address review comments

* Update SettingsSidebar and children

* Update EditProfile screen

* Update SettingsSidebar

* Keep track of latest componentId to appear

* Track componentId in state to use in navigation actions

* Update FlaggedPosts and children

* Update RecentMentions

* Update Settings

* Store componentIds in ephemeral store

* Update AttachmentButton

* Remove unnecessary dismissModal

* Fix typo

* Upate NotificationSettings

* Update NotificationSettingsAutoResponder

* Update NotificationSettingsMentions

* Update NotificationSettingsMobile

* Update CreateChannel and children

* Update MoreChannels

* Update ChannelPeek and children

* Update ChannelNavBar and children

* Update ChannelPostList and children

* Update ChannelInfo and children

* Update ChannelAddMembers

* Update ChannelMembers

* Update EditChannel

* Fix setting of top bar buttons

* Update Channel screen and children

* Update PinnedPosts

* Update LongPost

* Update PostOptions

* Update PostTextboxBase

* Update EditPost

* Check-styles fix

* Update DisplaySettings

* Update Timezone

* Update SelectTimezone

* Update IntlWrapper and Notification

* Update InteractiveDialog and children

* Update ExpandedAnnouncementBanner

* Update ClientUpgradeListener

* Update MoreDirectMessages

* Update SelectorScreen

* Update UserProfile

* Update Thread

* Update About

* Update ImagePreview

* Update TextPreview

* Update AddReaction

* Update ReactionList and children

* Update Code

* Update TermsOfService

* Update Permalink

* Update Permalink

* Update ErrorTeamsList

* Update Search

* Remove navigator prop

* Fix setButtons calls

* Remove navigationComponentId

* Fix test

* Handle in-app notifs in global event handler

* Fix in-app notification handling

* Fix typo

* Fix tests

* Auto dismiss in-app notif after 5 seconds

* Fix typo

* Update overlay dismissal

* Animate in-app notif dismissal and allow gesture dismissal
2019-07-08 10:03:31 -07:00
Miguel Alatzar
1b9b1e3f39 Merge branch 'master' into rnn-v2 2019-07-05 15:56:56 -07:00
Elias Nahum
24f33b2f97 Fix regression opening a channel from a push notification (#2952) 2019-07-05 15:55:08 -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
Miguel Alatzar
150253d392
[MM-16012] [MM-16084] Update screens related to settings sidebar + update SearchResultPost screen and its children (#2913)
* Update screens

* Update login tests

* Remove done

* Fix failing tests

* Update screens and components

* Check styles fix

* Update tests

* Prevent setState call after component unmounts

* Add empty setButtons func to dummy navigator

* Remove platform check

* Remove Platform import

* Update react-native-navigation version

* Add separate showModalOverCurrentContext function

* check-style fixes

* Remove overriding of AppDelegate's window

* Fix modal over current context animation

* Add showSearchModal navigation action

* Check-style fix

* Address review comments

* Update SettingsSidebar and children

* Update EditProfile screen

* Update SettingsSidebar

* Keep track of latest componentId to appear

* Track componentId in state to use in navigation actions

* Update FlaggedPosts and children

* Update RecentMentions

* Update Settings

* Store componentIds in ephemeral store

* Update AttachmentButton

* Remove unnecessary dismissModal

* Fix typo

* Check-style fix

* Address review comments
2019-06-24 12:52:08 -07:00
Miguel Alatzar
0f948f650d Merge branch 'master' into rnn-v2 2019-06-18 09:58:35 -07:00
Elias Nahum
6546dfdfd2
Set post list data and timestamp based on the user timezone if available (#2888) 2019-06-17 15:24:28 -04:00
Miguel Alatzar
7d67f1214e
[MM-16008] Update setNavigatorStyles and replace setOnNavigatorEvent (#2877)
* Update setNavigatorStyles

* Replace navigator.setOnNavigatorEvent and callbacks

* Update unit tests

* Save user notify props on componentWillUnmount

* Add TODOs about removing componentDidAppear/setNavigatorStyles

* check-styles fix

* Fix eslint errors
2019-06-14 08:14:26 -07:00
Elias Nahum
1e8a1307af
Update netInfo to check for internet connectivity (#2850)
* Update netInfo to check for internet connectivity instead of using apple.com as a reference

* Fix network indicator position on tablets
2019-05-31 13:33:56 -04:00
Elias Nahum
f7f56e958b
MM-9494 & MM-13888 Tapping execute actions & interactive keyboard dismissal (#2799)
* MM-9494 & MM-13888 Tapping with the keyboard opened executes the action & iOS iteractive keyboard

* Fix tests

* feedback review

* add new line at the end of file

* feedback review and added todo list

* Track interactive dismiss keyboard and set scrollview bounds natively

* Fix snapshots

* Fastlane default to current branch when no BRANCH_TO_BUILD is set

* Set NODE_OPTIONS in ios build script

* Rebind scrollview when channel gets first set of posts

* Keep scrolling momentum on keyboard close

* Update react-native-keyboard-tracking-view

* Fix ScrollView offset with keyboard-tracking

* Fix offset while dragging the keyboard

* Allow action on channel drawer on tablets

* Fix typo

Co-Authored-By: Saturnino Abril <saturnino.abril@gmail.com>

* Fix indentation
2019-05-20 12:02:00 -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
Miguel Alatzar
d213565ebb
Use numbered capture over named capture (#2765) 2019-05-03 13:18:41 -07:00
Miguel Alatzar
19c493ff6e
[MM-15401] Fix setting of extension when caching files (#2762)
* Get extension from Content-Disposition first

* User ImageCacheManager.cache over getCacheFile

* Add unit tests for ImageCacheManager.getCacheFile

* Add unit tests for ImageCacheManager.cache

* Use exports and require to be able to mock isDownloading

* Chain mockReturnValueOnce calls

* Fix getExtensionFromContentDisposition and its unit tests
2019-05-03 09:24:40 -07:00
Harrison Healey
1173ca3d97
MM-14030 Don't show large gifs in posts (#2750)
* MM-14030 Don't show large gifs in posts

* Re-add default argument
2019-05-01 09:34:45 -04:00
Miguel Alatzar
1a9b34f618
[MM-14699] Update image cache manager to handle correct file extensions (#2701)
* Update image cache manager to handle correct file extensions

* Use RNFetchBlob.fs.existsWithDiffExt to find cached images with
  extensions other than the default .png

* Add package-lock.json

* Use app/util/file's getExtensionFromMime

* Define DEFAULT_MIME_TYPE in image_cache_manager.js
2019-04-22 19:19:21 -07:00
Miguel Alatzar
a67863c5a2
[MM-14669] Return null dimensions when height or width is falsy (#2681)
* Return 50x50 dimensions when height or width is 0

* Refactor image constants

* Return null dimensions when height or width is falsy
2019-04-22 19:17:03 -07:00
kosgrz
6b5d0a49e5 [MM-14191] Render emojis in Interactive Message Buttons (#2640) 2019-04-09 11:41:39 -04:00
Orjiewuru Kingdom Isaac
102eeb93fe MM-13151 Increase double tap delay for post action buttons (#2406)
* Use app state to disable a button when click to prevent double tap

* remove disable button state after 4000ms

* modify preventDoubleTap to have optional delayTime param

* remove local state use for button control

* remove unused method

* remove app state method to disable a button

* Update tap.js
2019-04-02 10:22:31 -04:00
Elias Nahum
e053219fb0 MM-13795 Detect timezone updates on Android (#2660) 2019-03-19 18:10:45 -07:00
Elias Nahum
f539ddf765
MM-14630 Mark channel as read and viewed when opening brought from the background (#2658) 2019-03-19 19:58:23 -03:00
Saturnino Abril
b5e4b5a657
fix channel mention badge and posts after opening the app from push notification (which is initially at closed state) (#2648) 2019-03-16 00:04:30 +08:00
Elias Nahum
b0a18025c4
Wait for VPN connection only when appconfig flag is set (#2627) 2019-03-05 12:01:43 -03:00
Saturnino Abril
8a4c6de86f
fix intermittent crash when selecting a link (#2620) 2019-03-05 02:28:40 +08:00
Daniel Schalla
5794a0da4d
[MM-14081] Show MFA Prompt after Server returned error for login request (#2599)
* Show MFA Prompt after Server returned error for login request

* eslint

* Hide MFA error on first login attempt
2019-03-01 19:01:10 +01:00
Elias Nahum
3feaa8e6bb
iOS Native Share Extension (Swift) (#2575)
* iOS Native Share Extension (Swift)

* Re-arrange files

* Fix .gitignore
2019-02-26 14:31:57 -03:00
Dean Whillier
fceca49412
immediately return when connection is offline (#2594) 2019-02-25 16:23:28 -05:00
Daniel Schalla
e82146d52f
[MM-10346] Set CSRF Token from Cookie after Login / on App load (#2534)
* Set CSRF Token from Cookie after Login / on App load

* Reset CSRF on Logout

* Simplify cookie value access

* Make Set CSRF Blocking
2019-02-20 17:06:03 +01:00