Commit graph

44 commits

Author SHA1 Message Date
Elias Nahum
a7b604e8c9
MM-37660 Fix keep mention for channel A when opening a push notification on channel B (#5597)
* Fix keep mention for channel A when opening a push notification on channel B

* properly fix race condition

* Load channels and channel members when opening the app from a push notification
2021-08-05 19:56:36 -07:00
Daniel Espino García
4c8594d330
Add linter rules for import order and type member delimiters (#5514)
* Add linter rules for import order and type member delimiters

* Remove unneeded group

* Group all app/* imports before the internal imports

* Move app/ imports before parent imports

* Separate @node_modules imports into a different group

* Substitute app paths by aliases

* Fix @node_modules import order and add test related modules

* Add aliases for types and test, and group import types
2021-07-23 11:06:04 +02:00
Elias Nahum
0e81e0e2a8
fix: connect websocket when the component mounts (#5456) 2021-06-14 15:48:39 -04:00
Elias Nahum
6335932883
1.44 fixes (#5444)
* fix: get status as soon as appstate is in the foreground

* re-render post list when theme changes

* remove invalid userIds from get status request
2021-06-11 13:56:09 -04:00
Elias Nahum
9f238d5ef4
Post List & post components refactored (#5409)
* Update transform to make Android's post list scroll smooth

* set start since metric when appStarted is false

* Refactor Formatted components

* Downgrade RNN to 7.13.0 & patch XCDYouTube to allow video playback

* Refactor Post list and all related components

* review suggestion rename hour12 to isMilitaryTime

* feedback review use aliases

* feedback review deconstruct actions in markdown_link

* feedback review simplify if/else statement in combined_used_activity

* Simplify if statement for consecutive posts

* Specify npm version to build iOS on CI

* Refactor network_indicator

* render Icon in file gallery with transparent background

* Increase timeout to scroll to bottom when posting a new message

* fix: scroll when tapping on the new messages bar

* fix: dismiss all modals

* fix navigation tests

* Handle dismissAllModals for iOS to prevent blank screens

* Prevent modal from dismissing when showing the thread screen in the stack

* Update app/components/image_viewport.tsx

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* Update app/utils/post.ts

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* fix: rename selector and prop

* Fix XCDYouTube patch

* Fix posting from a thread in the right channel

* do not render reply bar on the thread screen

* close previous permalink before showing a new one

* move XCDYouTube patch to ios/patches folder

* closePermalink directly instead of using an onClose prop

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2021-06-03 11:12:15 -07:00
Elias Nahum
17fd4ee278
MM-32591: Reliable Websockets: Client side changes (#5362) 2021-05-07 08:20:41 -04:00
Elias Nahum
f8a0f29237
Update dependencies (#5266)
* Update dependencies

* Fix lint, use npm@6

* Fix unit tests

* Dowgrade Fastlane

* Fix Fastlane script

* use android:api-29-node ci image

* Infer gradle json file from apk output folder

* Fastlane to Parse new version of gradle output-metadata.json
2021-04-06 11:12:31 -04:00
Elias Nahum
dcaaaee44c
MM-30164 fix safe area insets (#4979)
* MM-30164 fix safe area insets

* Fix unit test setup mock for react-native-device-info

* Add insets for edit profile screen

* Fix about screen

* Fix theme screen

* Lock phone screen to portrait

* fix unit tests

* Fix autocomplete layout
2020-11-23 20:10:09 -03:00
Elias Nahum
b226d451f3
update dependencies (#4958)
* update dependencies

* revert keychain update

* Update dependencies & Fastlane

* set path agnostic for bash in scrips

* Fix open from push notification race

* patch react-native-localize
2020-11-18 19:45:07 -07:00
Elias Nahum
30d4aa2a3e
Build Improvements (#4884)
* Use AppGroupId from Info.plists instead of hardcoded constant

* Update script, ci & Makefile

* Update Cocoapods to 1.9.3

* Split android builds using ABI filters

* Update Fastlane deps & build scripts

* Update CI to use latests scripts

* Display app version & build number in select server screen

* Make generate scripts compatible with node < 12

* Build scripts

* add build script to package.json

* Update to use bundler 2.1.4 and CI with Xcode 12

* Fix script name for build:ios-unsigned

* Fix RN iOS scripts

* Update CI pods-dependencies step

* Add pipefail to android executor

* Update Fastlane

* Fix type in postinstall script

* update android executor and set TERM

* Fix S3 bucket name variable

* Apply suggestions from code review

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* Fix master unit tests

* use requireActual in jest setup

* Jest setup to use react instead of React

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-10-15 22:09:36 -03:00
Miguel Alatzar
57d60649f8
[MM-22959] Use Compass icons (#4847)
* Use Compass icons

* Update ChannelInfo and AdvancedSettings

* Fix search modifiers

* Fix Autocomplete item

* Remove VectorIcon component

* Unlink react-native-vector-icons

* Revert ProgressiveImage changes

* Update Mark as Unread icon

* Apply review suggestion

* Replace extension icons

* Update video control button style

* Replace (un)flag with (un)save

* Replace (un)flag with (un)save - take 2

* Use bookmark-outline icon

Co-authored-by: Miguel Alatzar <miguel@Miguels-MacBook-Pro.local>
2020-10-15 15:34:24 -07:00
Elias Nahum
a99e938e9c
MM-26817 Upgrade to RN 0.63 (#4566)
* Upgrade to RN 0.63

* Bump to RN 0.63.1

* Fix RN patch

* Use JSC Intl version

* Update android/app/build.gradle

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* Fix Android external storage permission

* Fix emoji imageUrl when no server url is present

* Patch react-native-image-picker

* Allow to post attachment only messages

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-07-20 18:08:11 -04:00
Miguel Alatzar
f79f9dc697
[MM-23761] [MM-25766] Add "More Messages" button (#4526)
* Add more messages button

* Update existing tests

* Various fixes:

* Use viewAreaCoveragePercentThreshold over itemVisiblePercentThreshold
* Remove currentUserId check when adding New Message line to postIds and
  instead update the channel last viewed time when an own post is received

* Update snapshots

* Add showMoreMessagesButton prop and default to false

* Android fixes

* Add tests

* Localize more messages text

* Use FormattedText

* i18 extract

* Style fixes

* Account for network indicator

* Fix for failing tests

* Various fixes:

* Set the unreadMessageCount when POST_UNREAD_SUCCESS is dispatched
  with a positive deltaMsgs
* Hide the more messages button when the unread count decreases or
  when the new message line is removed shortly after loading the
  channel

* No need for POST_UNREAD_SUCCESS if we manually call onViewableItemsChanged

* Reset unread count if current channel on channel mount

* Animate text opacity

* Compare indeces to determine when scrolling has ended

* Fix opacity animation trigger

* try with scrolling to the last rendered item

* Add onScrollEndIndex

* Improve animations

* Don't track moreCount in state

* Use moreText over prevNewMessageLineIndex to determine firstPage

* Update intl message format and call cancel in componentDidUpdate when needed

* Fix intl format

* Remove opacity animation and countText

* Fix pressed not being reset

* No need to separate intl func

* Return after resetting

* Fix accidental removal of setState call

* Reset pressed when newLineMessageIndex changes

* Use default windowSize and lower POST_CHUNK_SIZE and delays

* Queue a cancel timer that gets cleared only when the newMessageLineIndex changes

* Define uncancel func

* Increase cancelTimer delay

* Subtract read posts from unread count and account for retry indicator

* Add retry bar indicator tests

* Use props.unreadCount

* Fix handling of newMessageLineIndex change

* Fix handling of newMessageLineIndex change take 2

* Fix handling of newMessageLineIndex change take 3

* Use 'native' TouchableWithFeedback with dark overlay

* Fix handling of manually unread

* Update chunk and window sizes

* Fix hsl

* Update text only when newMessageLineIndex/endIndex is reached

* Don't delay cancel if when no more unreads

* Fixes for when opening the app

* No need to process viewableItems when unreadCount is 0

* Remove line

* Don't show if unreadCount is 0

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-07-09 13:30:30 -07:00
Elias Nahum
d3a6e166ad
MM-15758 Update dependencies including Fastlane (#4272)
* Update dependencies including Fastlane and disable Flipper on iOS

* Remove EventEmitter for previous doc-viewer

* Fix android crash when setting more channels buttons

* Downgrade fuse.js

* Upgrade deps to latest

* Update Podfile.lock

* Downgrade RNN to 6.4.0

* QA Review #2

* Upgrade fuse.js to 6.0.0
2020-05-18 11:24:47 -07:00
Elias Nahum
aaa571db32
Upgrade to RN 0.62.2 (#4093)
* Upgrade to RN 0.62.0

* Update packager module paths

* Fix Android PasteableInput

* Fix regression on Android share extension credentials needed

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

* Reject commit if TSC check fails and Fix small eslint issues automatically

* Use super.getExportedCustomBubblingEventTypeConstants in RNPasteableTextInputManager

* Update to rn 0.62.2

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-04-14 16:39:51 -04:00
Miguel Alatzar
ee4b85edcf
[MM-23520] Port mattermost-redux (#4088)
* Remove mattermost-redux

* Move mm-redux files into app/redux

* Add @redux path to tsconfig.json

* Fix imports

* Install missing dependencies

* Fix tsc errors

* Fix i18n_utils test

* Fix more imports

* Remove redux websocket

* Fix tests

* Rename @redux

* Apply changes from mattermost-redux PR 1103

* Remove mattermost-redux mention in template

* Add missing imports

* Rename app/redux/ to app/mm-redux/

* Remove test file

* Fix fetching Sidebar GM profiles

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-03-31 11:09:26 -07:00
Elias Nahum
10d433cfab
Port WebSocket from mm-redux and batch actions (#4060)
* Port WebSocket from mm-redux and batch actions

* Update mm-redux and fix tests

* Change action name

* Naming batch actions

* Fix unit tests

* Dispatch connection change only if its different

* Remove comment

* Add Lint to TypeScript and fix linting errors

* Add WebSocket Unit Tests

* Revert from unwanted RN 0.62
2020-03-26 21:23:50 -03:00
Elias Nahum
54c6d98683
Fix Android Navbar tap events (#4074) 2020-03-24 20:24:29 -03:00
Miguel Alatzar
f404fd00b0
[MM-23483] Add backgroundColor to drawer content parent View (#4067)
* Add backgroundColor

* Revert backgroundColor and set elevation instead

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-03-24 12:40:04 -03:00
Amit Uttam
587ba38f4e
MM-23234 Prefer mobile-defined state actions (#4057)
Unify usage to one set of defined dispatch actions in codebase, instead of a mix of (almost) identical actions defined in `mattermost-mobile` and `mattermost-redux` .
2020-03-20 13:53:33 -03:00
Elias Nahum
5e8872e2d3
MM-22752 Preserve other teams channel membership (#3987) 2020-03-02 11:21:11 -07:00
Elias Nahum
7c09334dc4
Deps update (#3806)
* Dependecy updates

* Update dependencies
2020-01-20 13:20:03 -03:00
Harrison Healey
dc66b443a3 MM-20947 Don't mark channel as read when reconnecting to manually unread channel (#3685) 2019-12-11 03:07:14 +08:00
Miguel Alatzar
90574d2fc5
Rename IOSX_TOP_PORTRAIT (#3412) 2019-10-17 07:58:18 -07:00
Elias Nahum
768bb9625a MM-18176 Fix network indicator stock after re-connect (#3329) 2019-09-27 13:42:28 -04:00
Elias Nahum
70102d2516 MM-18752 Rename constant to handle iPhone X and new iPhone 11 insets (#3296) 2019-09-23 13:08:32 -07:00
Elias Nahum
f263eac658
MM-17612 Fix fetch periodic status updates when re-connecting (#3089) 2019-08-09 18:47:38 -04:00
Elias Nahum
98da0aa607
MM-16815 Remove the failed posts banner on WS reconnect (#2983) 2019-07-18 11:36:37 -04: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
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
Elias Nahum
08df256c1d MM-14921 Fix iPad layout including safeAreaInsets (#2748)
* MM-14780 and MM-14921 Fix iPad layout including safeAreaInsets

* Fix unit tests
2019-05-03 17:42:32 -04: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
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
Elias Nahum
a0a1fa28ce
MM-13896 Sync channel as read between clients (including opening Push Notifications) (#2548)
* Update mattermost-redux to use latest WS changes

* Properly mark channel as read, keep the new message indicator, and fix push notification flow

* unneeded parameter in setCurrentUserStatusOffline

Co-Authored-By: enahum <nahumhbl@gmail.com>

* Feedback review

* Update mm-redux ref
2019-02-16 15:09:22 -03:00
Dean Whillier
c24ffe8b11
[MM 13720] Fix for "No internet connection" banner not always showing (#2563)
* Add `opacity` to compopnent state …

… to trigger render updates when the property changes.

* Fix bug stopping app from updating connection status

- if the app is opened when no internet connection is present, turning on the internet with the app open will not remove the `No internet connection` message.

* style corrections
2019-02-12 11:06:43 -05:00
Elias Nahum
477dcbb1c5 Fix other users status changes (#2491) 2019-01-07 15:15:12 -05:00
Elias Nahum
91f9ea572b Wait 1s before clearing notifications when app is brought to the foreground (#2419) 2018-12-06 21:41:31 +05:30
Elias Nahum
8fbb7e7081
Fix Post and network indicator Layouts (#2382)
* Fix post layout that caused text cutoff

* Fix network indicator layout on non iPhone X devices
2018-11-27 19:43:08 -03:00
Elias Nahum
a03016a9e3
Disconnect the websocket on logout and connect appropiately (#2375) 2018-11-23 14:54:43 -03:00
Elias Nahum
aa9fef955f
Do not disconnect WebSocket when NetworkIndicator on componentWillUnmount (#2368)
* Do not disconnect websocket when networkIndicator unmounts

* feedback review
2018-11-22 20:23:25 -03:00
Elias Nahum
6df0f8b915
Set the user status as offline when the app loses connection (#2366) 2018-11-22 11:09:55 -03:00
Elias Nahum
c8777422ce
Fix network indicator layout and reconnect logic (#2351)
* Fix network indicator layout and reconnect logic

* Reconnection logic to cover more use cases

* Check for internet connectivity when bringing the app to the foreground
2018-11-22 10:25:08 -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
Chris Duarte
4d5b49f104 Network consolidation (#2324)
* Create network listener component

* Remove unnecessary network/websocket logic

* Remove offline indicator. Fix linting issue

* Fix websocketStatus prop issue

* Refactor and remove animation from state

* Fix AppState listener. Add connection retry.
2018-11-14 18:19:59 -03:00