mattermost-mobile-upstream/app/database/models/server
cursor[bot] 0869dc8eab
[MM-62038] Fix urgent mention badge colors (#10119)
* [MM-62038] Fix urgent mention badge colors

Persist urgent mention counts and use them to render channel list badges with the urgent color treatment.

Co-authored-by: mattermost-code <matty-code@mattermost.com>

* Address CodeRabbit feedback on urgent mention count persistence

Skip unread updates when fetchMyChannel fails so persisted urgent
counts are not cleared, and preserve urgentMentionCount on partial
MyChannel transformer updates.

Co-authored-by: mattermost-code <matty-code@mattermost.com>

* Use should... names for urgent mention transformer tests

CodeRabbit requested the parameterized transformMyChannelRecord cases
start with should, matching the repo test-name guideline.

Co-authored-by: mattermost-code <matty-code@mattermost.com>

* Address PR feedback: 1 answered, 1 resolved, 0 declined

Persist urgent mention counts on the native killed-app push path
so in-app channel list badges stay urgent-colored after a cold start.

Co-authored-by: mattermost-code <matty-code@mattermost.com>

* Persist computed is_unread on iOS MyChannel update path

CodeRabbit flagged isUnreadCol <- isUnreadCol, which is a no-op.
Write the computed isUnread value so native push updates store
recalculated unread state, matching the insert path and Android.

Co-authored-by: mattermost-code <matty-code@mattermost.com>

* Address PR feedback: 2 answered, 1 resolved, 0 declined

Use the active theme's buttonColor for urgent mention badge text
instead of hardcoded Denim.

Co-authored-by: mattermost-code <matty-code@mattermost.com>

* Address PR feedback: 1 answered, 1 resolved, 0 declined

Treat omitted urgent_mention_count as 0 in transformMyChannelRecord.

Co-authored-by: mattermost-code <matty-code@mattermost.com>

---------

Co-authored-by: Matty Code <mattycode@mattycode-3.com>
Co-authored-by: mattermost-code <matty-code@mattermost.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-09-14 14:03:53 -04:00
..
category_channel.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
category.ts MM-54887 Fix category order being reversed after moving a channel (#7628) 2023-10-24 16:21:14 -04:00
channel_bookmark.ts Channel Bookmarks (#7817) 2024-07-18 09:10:28 +08:00
channel_info.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
channel_membership.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
channel.ts Database changes for autotranslations (#9495) 2026-02-10 15:04:35 +01:00
config.ts Move config to its own database table (#6744) 2022-11-11 21:20:42 +04:00
custom_emoji.ts Gekidou - Fix to make all models implement their respective interface (#6099) 2022-03-29 17:41:46 -03:00
custom_profile_attribute.ts [MM-62565] DB only custom profile attributes and fields (#8739) 2025-04-09 15:35:27 +02:00
custom_profile_field.ts [MM-62700] User Attribute types (#8903) 2025-06-12 10:59:13 +02:00
draft.ts BoR scheduled posts and drafts DB migrations (#9352) 2025-12-18 11:26:24 +05:30
file.ts Add is_blocked to FileModel (#8842) 2025-05-07 15:33:04 +08:00
group_channel.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
group_membership.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
group_team.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
group.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
index.ts Add BoardView, PropertyField, PropertyValue WatermelonDB tables (#9708) 2026-06-01 12:46:40 +02:00
my_channel_settings.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
my_channel.ts [MM-62038] Fix urgent mention badge colors (#10119) 2026-09-14 14:03:53 -04:00
my_team.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
post.ts Use message source on post edit (#7325) 2023-05-11 14:18:07 +02:00
posts_in_channel.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
posts_in_thread.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
preference.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
property_field.ts Add BoardView, PropertyField, PropertyValue WatermelonDB tables (#9708) 2026-06-01 12:46:40 +02:00
property_value.ts Add BoardView, PropertyField, PropertyValue WatermelonDB tables (#9708) 2026-06-01 12:46:40 +02:00
reaction.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
role.ts Add Playbooks read-only support for mobile devices (#8978) 2025-07-14 09:21:37 +02:00
scheduled_post.ts BoR scheduled posts and drafts DB migrations (#9352) 2025-12-18 11:26:24 +05:30
system.ts Gekidou - Fix to make all models implement their respective interface (#6099) 2022-03-29 17:41:46 -03:00
team_channel_history.ts Add Playbooks read-only support for mobile devices (#8978) 2025-07-14 09:21:37 +02:00
team_membership.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
team_search_history.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
team_threads_sync.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
team.ts Add Playbooks read-only support for mobile devices (#8978) 2025-07-14 09:21:37 +02:00
thread_in_team.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
thread_participant.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
thread.ts Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
user.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00