mattermost-mobile/app/utils
Kyriakos Z 6896129c73
MM-36980, MM-37030: Opens the thread on push notification and Notifications settings (#5618)
* 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>
2021-08-20 19:49:00 +03:00
..
bottom_sheet Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
mentions [MM-34415, MM-34808, MM-34572, MM-34385, MM-32445, MM-31525] Handle user and channel provider from the app parser (#5503) 2021-08-17 10:45:49 +02:00
sentry Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
apps.test.ts Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
apps.ts Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
avoid_native_bridge.js add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
channels.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
datetime.ts Feat crt (#5455) 2021-07-21 22:58:04 +05:30
document.ts Post List & post components refactored (#5409) 2021-06-03 11:12:15 -07:00
draft.js Post List & post components refactored (#5409) 2021-06-03 11:12:15 -07:00
draft.test.js MM-23090 MM-26078 && MM-26876 Refactor post draft component (#4621) 2020-08-06 19:39:25 -04:00
emoji.json MM-36900 Fix mm emoji (#5526) 2021-07-09 18:32:29 +02:00
emoji_utils.js [MM-35909] Support for emoji 13 (#5497) 2021-06-30 00:41:11 +02:00
emoji_utils.test.js [MM-35909] Support for emoji 13 (#5497) 2021-06-30 00:41:11 +02:00
emojis.js MM-36900 Fix mm emoji (#5526) 2021-07-09 18:32:29 +02:00
error_handling.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
file.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
file.test.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
gallery.ts Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
general.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
i18n.js Add t() translation mark to i18nable strings and update translations (#2026) 2018-09-21 11:25:38 -03:00
image_cache_manager.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
image_cache_manager.test.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
images.test.ts Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
images.ts Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
latinise.js Port WebSocket from mm-redux and batch actions (#4060) 2020-03-26 21:23:50 -03:00
list_view.js add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
markdown.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
markdown.test.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
member_list.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
message_attachment_colors.ts Migrate message attachments to typescript (#5127) 2021-04-22 18:21:44 -04:00
mix.ts Refactor rest client class to use mixin and a bit of cleanup (#5318) 2021-04-15 10:04:36 -04:00
network.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
notify_props.js MM-36980, MM-37030: Opens the thread on push notification and Notifications settings (#5618) 2021-08-20 19:49:00 +03:00
opengraph.js add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
permission.ts Update dependencies and setup project with node 16 / npm 7 (#5474) 2021-06-21 18:36:38 -04:00
post.ts Post List & post components refactored (#5409) 2021-06-03 11:12:15 -07:00
preferences.js Add eslint eol-last to require newline at end of files (#4985) 2020-11-30 21:46:05 -07:00
reaction.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
reaction.test.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
security.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
status.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
supported_server.test.js MM-26744 in-prompt for end users if server is unsupported (#4565) 2020-07-15 11:17:55 -04:00
supported_server.ts Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
tap.js MM-13151 Increase double tap delay for post action buttons (#2406) 2019-04-02 10:22:31 -04:00
tap.test.js MM-22089 set default prevent double tap to 1s for ChannelInfo modal (#4133) 2020-04-27 10:04:58 -04:00
teams.js [MM-23391] Sort sidebar teams order by user preference (#4911) 2020-12-10 17:35:05 -03:00
teams.test.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
theme.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
theme.test.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
timezone.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
tooltip.js add eslint-plugin-header, and --fix all (#1726) 2018-06-19 19:14:50 -04:00
url.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
url.test.js Revert "[MM-29225] Define LSApplicationQueriesSchemes so Linking.canO… (#5067) 2021-01-06 09:11:27 -07:00
users.js Port WebSocket from mm-redux and batch actions (#4060) 2020-03-26 21:23:50 -03:00
why_did_you_update.js Fix Posts cutoff (#2071) 2018-09-04 11:53:15 -03:00
wrap_context_provider.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00