* MM-36980: Opens the thread on push notification
This commit enables tapping on a push notification for a reply to open
the thread.
This is done only if the user has CRT set to 'on'.
* Refactor, and handle in app notifications
* Minor change
* Fixes erroneous check
* Fixes on dismiss in app notification
* Fixes in app push notification for CRT
* Adds CRT notification settings for android
Adds support for CRT (*_threads) notification settings (notify_props).
Adds android comoponents to toggle those settings for push notifications
and email notifications.
* Adds CRT notification settings for iOS
Adds iOS components to toggle those CRT notifications settings
for push notifications and email notifications.
* Fixes bad JSON and intl ids
* Fixes i18n ids
* Fixes tests
* Adds email_threads to the default notify_props
* Fixes push_threads notify_prop default value
* Fixes style, and channel missing on thread open
* Fixes test
* Fixes click notification to open thread
Previous handling of opening the thread on notification clicked fell
into an infinite loop when the app was closed.
This commit fixes that by adding the post to selectedPostId reducer and
then emitting an event to open the thread on channel_base, and only if
the app was started by the notification.
When the app is in the background emitting the event from
handleNotification works just fine.
When the app is in the foreground the notification clicked gets handled
elsewhere and this commit does not change that.
* Removes reply settings when CRT is ON
"Mentions and Replies" section becomes just "Mentions" when the user has
the Collapsed Reply Threads set to "ON".
* Fixes prop types
Co-authored-by: Kyriakos Ziakoulis <koox00@Kyriakoss-MacBook-Pro.local>
* 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
* [MM-31133]: participants screen component (#5116)
* Fixed imports
* Misc fixes
* Added i18n string
* Moved '(you)' after the name
* [MM-30386][MM-30387] Client and redux changes for collapsed reply threads (#5175)
* [MM-30386][MM-30387] Client and redux changes for collapsed reply threads
* fix tests
* add and use flat shim
* use test helper function
* use test helper function
* revert crt changes to unused client and action functions
* use toEqual
* incorporate code review feedback
* don't assume server success
* batch actions
* clearer code
* WIP in changes, websockets and more redux changes
* Added mark thread as read and mark all as read in a team
* Added isCollapsedThreadEnabled entity
* Fixed loading global screens on load if it's the last visited screen
* Added root count and websocker and redux events related to threads
* Fixed Message, Mention count root count on init and decrement actions
* Moved old client to new client/rest
* Misc fix
* Misc fix
* Misc.
* Old redux test cases fix
* Added polyfill back for array flat
* Fixes mark as unread and pariticipants error in thread
* Fixed initial load when CRT not enabled
* Handling CRT preference change
* Get threads fallsback to search in posts in case of unfollowed or unloaded threads
* Gets threads on reconnect
* DM, Channel counter fix
* Added threads redux tests
* Fixed channel dot issue when child post is arrived channel not active
* Cleaning up threads on load, not letting posts included in threads getting deleted which can trigger many posts to be loaded at once
* Fixed crash on team switch, partly fixed enable/disable from webapp
* Fix when viewing a post from notification, to prevent from navigating back to global threads
* Fixed when preferences are changed before app is launched
* Fixed issue of NO THREADS appearing on reconnect
* Excludes CRT handling for newly logged in users
* Fixed unread dot showing even when all messages are read
* Update app/mm-redux/selectors/entities/threads.ts
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Not viewing threads action is pushed only when suer is in Global Threads
* Fixed cleanup to exclude current team when cleanup starts on app going to background
* Dispatch is not passed as param, misc code fixes
* Preferences check and handling code refactored
* added redux-mock-store
* Preference change fix
* Removed user login dispatch when handling crt change
* Fixed fallback thread support
* Return getThread
* Added threads to sidebar, moved teamId logic to action
* [MM-29106, MM-34847, MM-34843, MM-34846] Collapsed reply threads, Global Threads & In Channel experience UI implementation (#5376)
* feat: global threads screen
* Refactored global thread menu and misc design fixes
* Added empty states for threads, unread. Removing markdown from thread messages.
* Added friendly date, fixed long usernames & channel names in threads view.
* Mark thread as read
* Added intl, refactored code, seperated thread footer from thread item
* Added intl to global threads, added global threads to android
* Added Follow button to thread view
* Added thread badges
* In Channel experience .. WIP
* Clean posts in channel incase CRT is enabled.
* Added follow button, deleted messages doesnot have footer and design is now according to figma
* Removed old post and post header
* Added for follow/unfollow thread and fixed old one
* MISC design & code fixes
* Added options-follow/unfollow to the post's long press menu
* Shows ORIGINAL MESSAGE DELETED in thread when root post gets deleted
* Post list ts fix
* Old testcases fix
* Eslint fix
* Added custom status emoji in at mention autocomplete
* Fixed the width of the displayname and username
* Changed the max width for the full name and username in the autocomplete item
* Review fixes
Changed the behaviour of ellipses for long names
* Removed safearea bottom
* Fixes Mark and unread and thread header theme
* Fixes mark as unread and pariticipants error in thread
* Unfollowing post fix and misc
* Merge with master fix
* Added fallback to get thread from posts in case of not following/unloaded threads
* Refactored code and added tests for screens
* Loads threads from global threads screen, marks thread as marked on new thread posts
* Fixed tabs render on no threads, threads footer items styling and tests
* Loads threads based on tab and items according to constant
* Added infinite loading, unreads based on redux and not active thread list
* Fixed the username cutting off after truncating display name issue
* Changed avatars to touchableOpacity and added prop for parent component to style
* Fixed infinite loading, tab switching scroll to top, misc styles, team switching, scroll indicator insets
* Added follow button to DMs, moved follow button further right only on ios
* Snapshot updated
* Moved from useSelector to connect HOC
* Scrolls to top on team change, changed thread constant from mm-redux
* Fix merge issue
* Test case fix
* Fixed participants list
* Update app/components/global_threads/global_threads.tsx
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Update app/components/global_threads/thread_footer/thread_footer.tsx
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Update app/components/sidebars/main/channels_list/channel_item/index.js
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Update app/screens/thread/index.js
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
* Moved date numbers to constants
* Fixed global threads component issues
* Thread item display logic moved to redux
* Misc fixes
* Reverted to TouchableWithFeedback with opacity
* Removed obselete snapshots
* Removing currentTeamId as we aregetting it in action
* Moved to connect component from useSelect for sidebar
* Thread read issue fix
* Removed react-native-navigation mock
Co-authored-by: Anurag Shivarathri <anurag6713@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Manoj <manoj@brightscout.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Anurag Shivarathri <anurag6713@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Manoj <manoj@brightscout.com>
Co-authored-by: Ashish Bhate <bhate.ashish@gmail.com>
Co-authored-by: Ashish Bhate <ashish.bhate@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Manoj <manoj@brightscout.com>
* Fix SSO and clear cookies
* Fix unit tests
* Removed unnecessary argument
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
* MM-24501 Load all (joinable) teams when resetting app state
The subsequent `loadMe` only fetches a user's already-joined teams, which doesn't populate `state.entities.teams.teams` with the entire set of teams available, including potentially joinable teams.
Fixes https://github.com/mattermost/mattermost-mobile/issues/4209
* Add names to batched team action groups
* 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
* 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>
* 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
`setDeviceOrientation` and `setDeviceDimensions` used to get called on any navigation change (e.g. modal launches) and triggered multiple needless dispatches.
* 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
* 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