Commit graph

3049 commits

Author SHA1 Message Date
Mattermost Build
c19f73a8a7
Automated cherry pick of #4227 (#4237)
* Update NOTICE.txt

* Update NOTICE.txt

Co-authored-by: Amy Blais <amy_blais@hotmail.com>
2020-04-28 07:43:50 -04:00
Miguel Alatzar
7158050f1a
Bump app build number to 289 (#4242) (#4243) 2020-04-27 15:43:18 -07:00
Mattermost Build
67ac6ec8a5
Add find_replace_string for MMKVStorage (#4241)
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-04-27 15:35:01 -07:00
Mattermost Build
97175667f1
Wrap screen in gestureHandlerRootHOC (#4238)
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-04-27 10:10:55 -07:00
Amit Uttam
b3d274b6c7
[MM-24463] Run message retention cleanup off of pre-existing state (#4222)
* MM-24463 Run message retention cleanup off of pre-existing state

Instead of a reconstructed "zero" state.

Only posts in channels, searched posts and flag posts are recalculated (as per data retention policy, if applicable). The rest of state is cloned from existing state.

* Mark hydrationComplete only if _persist state is undefined

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-27 13:39:11 -03:00
Mattermost Build
bb557ff4fa
Automated cherry pick of #4133 (#4233)
* MM-22089 set default prevent double tap to 1s

* Increase tap debounce delay for ChannelInfo modal action

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Amit Uttam <changingrainbows@gmail.com>
2020-04-27 12:05:25 -04:00
Mattermost Build
1c92529958
Fixing padding of searchbar in search screen (#4236)
Co-authored-by: avasconcelos114 <andre.onogoro@gmail.com>
2020-04-27 12:29:58 -03:00
Amit Uttam
e84f7196a0
Bump app version number to 1.31.0 (#4234) 2020-04-27 11:32:52 -03:00
Amit Uttam
bcb4197ea8
Bump app build number to 288 (#4232) 2020-04-27 11:21:45 -03:00
Miguel Alatzar
1454dc918c
Bump app build number to 287 (#4229) (#4231) 2020-04-24 11:59:47 -07:00
Mattermost Build
f4e180d339
Automated cherry pick of #4225 (#4228)
* MM-24451 Set prev app version to current on logout/reset cache

* Fix unit tests for master

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-24 11:17:07 -07:00
Elias Nahum
43c42caba7
Bump app build number to 286 and version to 1.30.1 (#4221)
* Bump app build number to 286

* Bump app version number to 1.30.1
2020-04-23 13:39:09 -04:00
Miguel Alatzar
e1a9c47a58
[MM-24426] [MM-24451] Set previous app version in redux store (#4197) (#4219)
* Set previous app version in redux store

* Handle setting previousVersion on login and clearing data

* Set previous version on logout instead

* Remove action arg
2020-04-23 12:56:26 -03:00
Mattermost Build
9434acd79a
Automated cherry pick of #4192 (#4216)
* Fix infinite loop retrieving post files

Right now if all the attachments of a post are removed the component
update code enters into an infinite loop becuase the comparison between
arrays always return false.

* Move all the code inside the file changing detector condition

Co-authored-by: Mario de Frutos <mario@defrutos.org>
2020-04-23 07:56:14 -04:00
Mattermost Build
9f578461e4
Automated cherry pick of #4203 (#4215)
* Fix Crash on iOS with EMM enabled

* Fix Android Passcode authentication

* Fix Login screen header when EMM does not allow other servers

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-23 06:10:39 -04:00
Mattermost Build
968507d8c9
MM-24385 Fix ExperimentalStrictCSRFEnforcement (#4214)
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-23 06:10:10 -04:00
Mattermost Build
7f3ff62609
added isLandscape (#4210)
Co-authored-by: rahimrahman <rahim@r2integration.com>
2020-04-22 18:54:07 -07:00
Elias Nahum
ecee2074a1
translations PR 20200420 (#4189) 2020-04-22 19:38:03 -04:00
Mattermost Build
9e4c790b2d
Automated cherry pick of #4195 (#4208)
* Patch react-native-image-picker to allow selecting video

* Improve patch

* Fix Attaching a Photo capture

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-22 19:27:01 -04:00
Mattermost Build
19db2ebcc7
Check canPost permissions for v5.22+ (#4202)
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-04-22 08:50:30 -07:00
Elias Nahum
19d6aaa932
TSC to skipLibCheck 2020-04-18 10:27:40 -04:00
Elias Nahum
0e2bc65d70
MM-23848 consolidate store, upgrade mmkv and fix logout (#4145)
* MM-23848 consolidate store, upgrade mmkv and fix logout

* Feedback review

* Add store.ts to modulesPath
2020-04-18 10:18:24 -04:00
Mattermost Build
3a887b446a
Automated cherry pick of #4138 (#4183)
* Set back button color

* Update unit test

Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-04-17 22:52:58 -07:00
Mattermost Build
7f450e9532
Automated cherry pick of #4142 (#4182)
* Fix isDateLine function to check for null and undefined

* use optional chaining instead

Co-Authored-By: Amit Uttam <changingrainbows@gmail.com>

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Amit Uttam <changingrainbows@gmail.com>
2020-04-17 22:52:27 -07:00
Mattermost Build
f407bd0568
Automated cherry pick of #4132 (#4181)
* MM-22041 Fix Keyboard flashing when entering keyboards screen

* Update snapshots

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-17 22:52:06 -07:00
Mattermost Build
c48a5e3b61
MM-22043 Render Channel purpose message without markdown (#4180)
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-17 22:50:50 -07:00
Mattermost Build
7e0ca73c28
MM-22683 use webhook override_username instead of webhook creator on commented on post header (#4179)
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-17 22:49:26 -07:00
Mattermost Build
6008e6bae2
MM-22198 Don't show commented on for post on the same thread after a date separator (#4178)
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-17 22:44:10 -07:00
Miguel Alatzar
9a0bce5b6d [MM-23698] [MM-19559] Remove redux-offline and updated redux-persist (#4120)
* Remove redux-offline and configure redux-persist

* Fix typo

* Fix configure store

* Upgrade to redux-persist 6.0.0

* Add migration from redux-persist v4 to v6

* Replace AsyncStorage with MMKVStorage to boost storage speed

* Mock RNFastStorage

* Fix reactions test

* Fix clearing the store on logout

* Remove the need for LOGOUT_SUCCESS

* No need to pass persistConfig to middlewares()

* Remove unused imports

* Export connection

Accidentally removed this export.

* Add batch action name

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

* Add batch action name

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

* Add batch action name

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

* Add batch action name

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

* Fix delete post

* Fix leave channel

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-17 22:30:27 -07:00
Mattermost Build
88f1041f89
Automated cherry pick of #4110 (#4177)
* Dismiss keyboard on edit post close

* Don't use edit post request

* Focus on error

Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-04-17 22:08:00 -07:00
Mattermost Build
c15bb73d45
Don't pre-fetch posts for unread archived channels (#4176)
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-04-17 21:46:35 -07:00
Mattermost Build
023eb8c426
Correctly add additional actions (#4174)
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-04-17 21:39:44 -07:00
Mattermost Build
9ffa3ee8f3
Automated cherry pick of #4111 (#4175)
* Remove duplicated websocket client & constants

Defunct code originally maintained in mattermost-redux, but not used in mobile, in favour of https://github.com/mattermost/mattermost-mobile/blob/master/app/client/websocket.ts

* PR review: Remove redundant reference to constants

* Remove deleted files from modules list
2020-04-18 01:39:30 -03:00
Amit Uttam
a8147a1697
[MM-23490] Save state to file via async middleware vs store subscription (#4059)
MM-23490 Save state to file via async middleware vs store subscription

Currently for iOS, a subset of store state is saved to an on-device file, so that the Share Extension can have access to information it needs (teams and channels) to function.

This file saving would happen via a store subscription which triggers a file save for every dispatched action. By moving this logic to a middleware function, when this function gets invoked is now limited to a configurable set of action dispatches. (e.g. `LOGIN`, `CONNECTION_CHANGED`, `WEBSOCKET_SUCCESS`), etc.

MM-23493 Move app cache purge from store subscription to middleware (#4069)

* MM-23493 Move app cache purge from store subscription to middleware

This commit exposes persistence configuration as a static reference, so that cache purging can be invoked on demand anywhere else in the codebase.
While middleware still may not be the best spot for this singular "action", existing functionality (reacting to `OFFLINE_STORE_PURGE`) is maintained.

The change also removes the need for `state.views.root.purge` to exist in the state tree.

* PR feedback: Inject config dependency for purging app cache

Previously, `middleware` imported the config back from `store` (i.e. cyclic import).

* PR feedback: No need to export config, now that it's passed as argument

* Fix tests after refactoring middleware call from array -> function

* PR feedback: Let parent continue to pass down initial store state
2020-04-18 01:32:47 -03:00
Miguel Alatzar
b2190b7b9a [MM-22671] [MM-22935] Fetch posts for unread channels on loadChannelsForTeam (#4078)
* Fetch posts for unread channels on loadChannelsForTeam

* Add unit tests

* Remove unneeded setRetryFailed and getState

* Update getChannelSinceValue comment

* Move to post.js and pass in channels and channelMembers

* Exclude current channel

* Address PR review comments

* Fix import

* Fix mm-redux references
2020-04-17 21:29:07 -07:00
Mattermost Build
f39b98e4d1
Update mm-redux path (#4173)
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-04-17 21:19:36 -07:00
Miguel Alatzar
2d81b497cf [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-04-17 21:12:09 -07:00
Mattermost Build
d100c7d95d
Automated cherry pick of #4072 (#4172)
* MM-22292 Don't use redux to store username and password

* Set login and password MFA props

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-17 20:53:48 -07:00
Elias Nahum
03d406021f 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-04-17 20:44:25 -07:00
Amit Uttam
844d81072f
Revert "[MM-23490] Save state to file via async middleware vs store subscription (#4059)"
This reverts commit 1d7149a26d.
2020-04-17 20:59:46 -03:00
Amit Uttam
1d7149a26d
[MM-23490] Save state to file via async middleware vs store subscription (#4059)
MM-23490 Save state to file via async middleware vs store subscription

Currently for iOS, a subset of store state is saved to an on-device file, so that the Share Extension can have access to information it needs (teams and channels) to function.

This file saving would happen via a store subscription which triggers a file save for every dispatched action. By moving this logic to a middleware function, when this function gets invoked is now limited to a configurable set of action dispatches. (e.g. `LOGIN`, `CONNECTION_CHANGED`, `WEBSOCKET_SUCCESS`), etc.

MM-23493 Move app cache purge from store subscription to middleware (#4069)

* MM-23493 Move app cache purge from store subscription to middleware

This commit exposes persistence configuration as a static reference, so that cache purging can be invoked on demand anywhere else in the codebase.
While middleware still may not be the best spot for this singular "action", existing functionality (reacting to `OFFLINE_STORE_PURGE`) is maintained.

The change also removes the need for `state.views.root.purge` to exist in the state tree.

* PR feedback: Inject config dependency for purging app cache

Previously, `middleware` imported the config back from `store` (i.e. cyclic import).

* PR feedback: No need to export config, now that it's passed as argument

* Fix tests after refactoring middleware call from array -> function

* PR feedback: Let parent continue to pass down initial store state
2020-04-17 20:37:13 -03:00
Mattermost Build
2434f3465b
Get store data on init (#4171)
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-04-17 16:00:04 -07:00
Mattermost Build
0dbd8649cb
Automated cherry pick of #4125 (#4170)
* Set minHeight

* Replace minHeight with paddingVertical

Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-04-17 15:59:32 -07:00
Miguel Alatzar
a17bc4683c
Bump app build number to 285 (#4167) (#4168) 2020-04-16 19:35:34 -07:00
Mattermost Build
7f3798a547
Automated cherry pick of #4165 (#4166)
* Fix headers when preloading images

* Import isGif

Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-04-16 19:28:14 -07:00
Elias Nahum
2418a3bdfd
Bump app build number to 284 (#4162) 2020-04-16 16:42:04 -04:00
Mattermost Build
7a4e7711d1
Automated cherry pick of #4160 (#4161)
* Correctly load file attachment images

* Remove cache control from gallery

* Remove unused import

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-16 16:33:45 -04:00
Elias Nahum
fc25935482
Bump app build number to 283 (#4159) 2020-04-16 09:01:30 -04:00
Elias Nahum
a02e536e35
MM-24202 Add ability to invalidate specific versions (#4158) 2020-04-16 08:53:20 -04:00
Mattermost Build
f610a1dd55
Bump app build number to 282 (#4155)
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-14 16:03:00 -04:00