Commit graph

300 commits

Author SHA1 Message Date
Jesús Espino
d17e94eae3
Using new getKnownUsers api to cleanup the users on leave channel (#4220) 2020-05-11 13:29:08 -03:00
Mattermost Build
19a282ad41
Ensure receivedPosts runs first (#4285)
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-05-08 08:19:03 -07:00
Mattermost Build
6cdb50ed39
Revert "Disable loadUnreadChannelPosts (#4245)" (#4252)
This reverts commit 8de77754ef.

Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-04-30 09:16:32 -07:00
Mattermost Build
ae5cdb56a3
Automated cherry pick of #4090 (#4248)
* Fix post in channel batching order

* Preserve preferences on reset cache

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-30 04:21:30 -04:00
Mattermost Build
9a53918f57
Disable loadUnreadChannelPosts (#4246)
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
2020-04-29 12:01:25 -07:00
Elias Nahum
8e314022ca
MM-24285 Use FastImage instead of Image (#4218)
* Enable ESLint no-unused-vars

* Use FastImage instead of Image

* Update fast-image patch to support multiple cookies

* Fix ESLint errors

* Have jest run timers for post_textbox tests

* Feedback review

* Update snapshots
2020-04-28 11:36:32 -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
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
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
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
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
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
Elias Nahum
e6099bcaf8
Fix post in channel batching order (#4089) 2020-03-30 15:02:35 -03:00
Elias Nahum
00a05b1671
fetch statuses for users in DM/GM's (#4086) 2020-03-30 14:19:47 -03:00
Mattermost Build
8bd4a49849
Automated cherry pick of #4064 (#4073)
* MM-23341 Fix message failed banner when posting first message

* Set switchToChannel flag back to false

* Feedback review

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-03-24 17:29:45 -03:00
Elias Nahum
1a1c73279b
Upgrade Dependencies (#4034)
* Upgrade Navigation library

* Fix background color on Select Server

* Upgrade Navigation library

* Apply patch to nav lib

* Upgrade RNN to 6.1.1

* Update Dependencies

* Feedback review

* Call clearNavigationComponents when reset to channel
2020-03-18 19:09:20 -03:00
Elias Nahum
ec4dfb65b2
MM-23230 Batch post actions and fine tune postlint (#4042)
* PostList optimizations on FlatList

* Stop scroll to index if there is an interaction

* Fix unit tests

* MM-23176 Fix crash due to scrollToIndex out of range

* Batch mark channel as read action

* Fine tune post list

* Batch actions for getting posts

* Update app/utils/push_notifications.js

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

* Update app/actions/views/channel.js

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

* Pass state as arg to markAsViewedAndReadBatch

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-03-18 16:59:45 -03:00
Elias Nahum
c685690d1e
MM-23179 Avoid unnecessary Overdraws (#4025)
* Set navigation based on theme only once

* Remove unnecessary overdraws

* Feedback review
2020-03-13 11:22:43 -07:00
Elias Nahum
5f74491ea8
Upgrade Navigation library (#3997)
* Upgrade Navigation library

* Feedback review on Navigation Library

* Fix select server background color

* Fix iPhone 11 and 11 Pro Max navbar height

* Fix background color on Select Server

* Upgrade nav lib to 6.1.0

* Apply patch to nav lib

* Upgrade RNN to 6.1.1
2020-03-09 12:50:42 -07:00
Harrison Healey
f751b552b4
Add custom rule to prevent passing getState into dispatch (#4010)
* Add custom rule to prevent passing getState into dispatch

* Update package.json
2020-03-06 17:07:20 -05:00
Miguel Alatzar
898b59ab27
Fix app hanging when switching to a team after opening push notification (#4013) 2020-03-05 09:52:56 -07:00
Elias Nahum
58dcbb215b
Fix typing on input box after returning from an archived channel (#3992) 2020-03-03 19:44:23 -03:00
Elias Nahum
c9d78766d4
MM-22752/MM-22686 global timeout and team switch (#3978)
* MM-22686 decrease request timeout to 5s

* MM-22752 Fix switching teams with and without connction
2020-03-01 09:25:53 -03:00
Elias Nahum
f3a94bfbc9
Fetch archived channels (#3964) 2020-02-27 08:12:20 -05:00
Elias Nahum
28384bc9d2
Fix in-app notification crashing when receiving multiple (#3967)
* Fix in-app notification crashing when receiving multiple

* Dismiss the overlay when tap without waiting for interaction manager
2020-02-26 10:57:17 -05:00
Elias Nahum
334a07aabe
Performance improvements (#3911)
* Improve sidebar performance on first load

* Initial work for switch channel

* Revert android changes

* Split Sidebar per Platform

* Fix waitForHydration executing the callback more than once

* Fix custom emoji not showing on Android

* Finalize Channel Switch

* Enable Android Ram Bundles

* Select the right team for lastChannelForTeam

* Channel loading post indicator

* Fix main sidebar base intl provider

* Update mm-redux

* No need to request configAndLicense on launch

* Load channel member roles

* Rename closeChannelDrawer to closeMainSidebar

* do not throw errors when console is called while running tests

* constant for LOADING_POSTS_HEIGHT

* Remove show more if a long post is edited and no longer long

* Update mm-redux#batch-actions branch

* Code review

* Clear notifications if channel was switched

* Import Platform

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2020-02-17 21:18:09 -07:00
Amit Uttam
36c7cf4014 MM-21723 Handle deep link errors to inaccessible teams, channels & permalinks (#3815)
* Consolidated error handling for a user's reachable teams.
* Consolidated error handling for a user's reachable channels.
2020-01-21 14:43:24 -03:00
Miguel Alatzar
24820bd34d
[MM-21865] Dispatch loadConfigAndLicense on successful login (#3819)
* Dispatch loadConfigAndLicense on successful login

* Emit server version changed event

* Make linter happy
2020-01-20 08:25:42 -07:00
Amit Uttam
f3b0e4aa28 MM-21068 Notify when attempting to enter private channel/group via explicit link (#3759) 2020-01-13 20:57:06 -07: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
a58ebad7b1 [MM-18177] Increase post visibility when creating/receiving a new post for the current channel (#3662)
* Increase post visibility for current channel on new post

* Increase post visibility after post creation
2019-12-08 15:30:24 -03:00
Elias Nahum
4933cecd1d MM-20758 MM-20762 Fix archived channels in more channels screen (#3635)
* MM-20758 MM-20762 Fix archived channels in more channels screen

* Separate archived and public channels
2019-12-01 22:07:28 -05:00
Valentijn Nieman
759d1ce86d MM-19337 Enable users to view archived channels (#3514)
* Archived channels dropdown in more channels modal

* Rename redux actions for archived channels

* Fixed tests and updated snapshots

* Unit test for search in more_channels

* Use translation for dropdown label

* Minimum server requirement for dropdown

* Use BottomSheet instead of Picker component

* loadPublicAndArchivedChannels action instead of separate channel get actions

* Add styles to StyleSheet

* Update mattermost-redux hash

* Update mattermost-redux hash

* Default case for switching channels dropdown

* Improve imports in more_channels.js component

* Fix typo in import

* Add padding to dropdown if landscape

* Update snapshot

* Page counter for public and archive channels

* Updated mattermost-redux commit hash

* Bottom sheet title for ios

* i18n-extract for new showArchived and showPublic strings

* Update mattermost-redux commit hash to latest master
2019-11-18 22:38:30 +08:00
Elias Nahum
dc830c56be
MM-20149 Fix marking channels as read (#3549)
* MM-20149 Fix marking channels as read

* empty commit
2019-11-13 13:38:20 -05:00
Miguel Alatzar
04210b8a14 [MM-19968] Ensure SELECT_CHANNEL_WITH_MEMBER is dispatched when app opened from a push notification (#3533)
* Dispatch SELECT_CHANNEL_WITH_MEMBER

* Call handleSelectChannel with true when from any push notification

* Always dispatch SELECT_CHANNEL_WITH_MEMBER with passed channelId

* Add missing comma

* Update unit tests

* Fix makrChannelViewedAndRead call
2019-11-12 17:45:11 -05:00
Elias Nahum
64d22fd0f2 MM-18313 Fix update timezone automatically (#3462)
* MM-18313 Fix update timezone automatically

* add unit tests
2019-10-25 08:01:32 -07:00
CJ
55f048ad76
MM-18173 Removed getState from Add Channel Member method (#3371)
Removed getState from Add Channel Member method since the Redux store is not looking for it. 3rd param for this method is a postRootID, which is not sent from this request.
2019-10-12 01:30:03 -04: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
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
Elias Nahum
d4bd7833ea Fix loosing the server config when handleManagedConfig (#3125) 2019-08-15 08:25:46 -07:00
Miguel Alatzar
ffbae7589f Apply setNavigatorStyles to all navigation components (#3121) 2019-08-15 02:00:21 +08:00
Elias Nahum
32f329fca2
MM-17693 Android fix close settings screen (#3108)
* MM-17693 Android fix close settings screen

* Fix unit tests
2019-08-13 10:29:54 -04:00
Elias Nahum
5869e1a110
Fix pop thread screen when deleting the root post (#3092) 2019-08-09 11:04:24 -04: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
Elias Nahum
76df42bbd1 MM-16752 Fix unhandled promise rejection TypeError state.websocket.lastConnectAt (#3039) 2019-08-02 13:04:50 -07:00
Miguel Alatzar
59e948f06a Apply new theme to all navigation components (#3005) 2019-07-23 12:21:35 -04:00