mattermost-mobile/app/screens
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
..
about Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
add_reaction Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
apps_form [MM-35617] App modals are now opened from components instead of actions (#5394) 2021-08-06 11:21:31 -04:00
channel MM-36980, MM-37030: Opens the thread on push notification and Notifications settings (#5618) 2021-08-20 19:49:00 +03:00
channel_add_members Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
channel_info [MM-35617] App modals are now opened from components instead of actions (#5394) 2021-08-06 11:21:31 -04:00
channel_members Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
channel_notification_preference Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
code Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
create_channel Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
custom_status Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
custom_status_clear_after MM-37608 and MM-37416 issue fixes (#5592) 2021-08-09 22:57:38 -04:00
edit_channel Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
edit_post [MM-37840, MM-37841] do not mark channel as read when clearing push notifications (#5623) 2021-08-13 13:00:09 -04:00
edit_profile MM-37666 Properly dismiss edit profile screen (#5599) 2021-08-06 08:57:43 -04:00
error_teams_list Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
expanded_announcement_banner Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
forgot_password Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
gallery Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
interactive_dialog Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
login Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
login_options Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
mfa Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
more_channels Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
more_dms Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
notification MM-36980, MM-37030: Opens the thread on push notification and Notifications settings (#5618) 2021-08-20 19:49:00 +03:00
options_modal Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
participants_list Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
perf_metrics Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
permalink Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
pinned_posts Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
post_options MM-37485 MM-37602 MM-37610 MM-37684 MM-37719 MM-37522 MM-37720 App crash, Sync issue fixes (#5612) 2021-08-11 15:56:38 +05:30
reaction_list Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
recent_mentions Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
saved_posts Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
search Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
select_server Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
select_team Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
selector_screen Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
settings MM-36980, MM-37030: Opens the thread on push notification and Notifications settings (#5618) 2021-08-20 19:49:00 +03:00
slide_up Upgrade Dependencies (#5578) 2021-07-29 19:06:37 -04:00
sso Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
table Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
terms_of_service Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
thread MM-37485 MM-37602 MM-37610 MM-37684 MM-37719 MM-37522 MM-37720 App crash, Sync issue fixes (#5612) 2021-08-11 15:56:38 +05:30
user_profile Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00
index.js Add linter rules for import order and type member delimiters (#5514) 2021-07-23 11:06:04 +02:00