* Fix infinite skeleton in different use cases
* Apply suggestions from code review
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
* Update app/utils/teams.js
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
* Set rehydration values to true on clean up
* Remove extra line
* Update app/store/middlewares/helpers.js
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Fix setting of views.root.hydrationComplete
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Serialize/Deserialize state as string in store, instead of map
To see if this positively impacts performance lag issues (channel sidebar opening, etc.)
* Update app/store/mmkv_adapter.ts
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Update app/store/mmkv_adapter.ts
* Typescript fixes
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Miguel Alatzar <this.migbot@gmail.com>
* 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
* 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>
* Set previous app version in redux store
* Handle setting previousVersion on login and clearing data
* Set previous version on logout instead
* Remove action arg
* 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>
* 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
* 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
* 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
* No need to resetToChannel on clearing data
* Don't use componentWillReceiveProps
* Dismiss all modals on iOS too
* Use centerChannelBg when channel as root
* Fix resetToChannel test
* Fix removal of loadChannels call when rebasing with master
* Add new line
* Address PR review comments
* 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>
* MM-21085 Updated waitHydration
Updated the hydration of hte store to first check if it completed as this was being caused due to a race condition.
* MM-21085 Updated for callback
MM-21085 Updated for callback
* 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
* 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