mattermost-mobile-upstream/app/hooks
Mattermost Build bf24c1812b
Mm 68767 zero persistence (#9803) (#9957)
* implements auto cache cleanup when zero persistence mode is enabled (0 value)

* uses memory flag with sqlite instead of loki when running in zero persistence mode

* renames ephemeral mode manager and improves readability

* zero persistence refactors and restore values during transitions

* fixes ephemeral mode tests

* use initializeClient instead of just initialize to wait for doReconnect to finish

that way teams loading is awaited while WS reconnects during ZPM transitions

* adds inital sync as a mount hook to prevent undesired load error states

during app cold start in ZPM mode, we need a way to load team and channels
without showing loading error during the transition. The nre is initial sync
hook allows for it

* reset started sync subject on wipe

* removes extra log lines

* resets tracked server during ephemeral mode transitions

* improvements to apply persistence mode changes when something fails

* address coderabbit PR suggestions

* add batching time logging

* throws ephemeral mode change error as is

* make deleteServerDatabaseFiles private

* inline derive persistence flag function

* return current user id when refetching current user

* support zero persistence mode server for push notifications

* adds support for zero persistence mode when sharing to mattermost

* adds clarifying comment

* catch and log error deleting files

* reorder translations to correct position

* adds some new tests to improve coverage

* ios push notification native fix

* logout when fetchMe fails with 401 status code during reconnection

* properly surface errors

* return proper false value when checking for zero persistence flag

* change comments and properly await on some operations

* prevent not set persistence mode to report as an error



* include servers with no persistence flag set in share list

* disable button for accessibility



* improves when to store and remove signing key from global area

* review push notification reception running in zero persistence mode

* add server to ephemeral mode manager right after login

---------


(cherry picked from commit a5ff8a0d95)

Co-authored-by: Carlos Garcia <carlos.garcia@mattermost.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-20 13:31:53 +03:00
..
use_focus_after_emoji_dismiss Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
use_input_accessory_view_gesture Multiple Fixes (#9767) 2026-05-19 16:35:20 +08:00
use_keyboard_events Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
use_keyboard_state_context Multiple Fixes (#9767) 2026-05-19 16:35:20 +08:00
use_keyboard_state_machine Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
use_pressable_opacity Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
use_tabs Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
access_control_attributes.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
access_control_attributes.ts Mm 63935 abac end user indicators (#8848) 2025-05-19 15:34:03 +02:00
android_back_handler.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
android_back_handler.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
android_home_tab_back_handler.test.ts [MM-69227] Fix back button behavior (#9927) 2026-07-13 17:43:09 +02:00
android_home_tab_back_handler.ts [MM-69227] Fix back button behavior (#9927) 2026-07-13 17:43:09 +02:00
apps.test.tsx Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
apps.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
autocomplete.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
autocomplete.ts Fixes autocomplete, bad ssl message on android and edit post (#9799) 2026-06-01 23:21:29 +08:00
channel_switch.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
channel_switch.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
device.test.tsx Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
device.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
did_mount.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
did_mount.ts Enable exhaustive deps in the repo (#9508) 2026-02-18 11:56:16 +01:00
did_update.test.tsx Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
did_update.ts Enable exhaustive deps in the repo (#9508) 2026-02-18 11:56:16 +01:00
emoji_category_bar.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
emoji_category_bar.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
fetching_thread.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
fetching_thread.ts Enable exhaustive deps in the repo (#9508) 2026-02-18 11:56:16 +01:00
field_refs.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
field_refs.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
file_upload_error.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
file_upload_error.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
files.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
files.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
gallery.test.ts [MM-69455] Fix channel bookmark taps with React Native New Architecture (#9904) 2026-07-02 13:55:27 -07:00
gallery.ts [MM-69455] Fix channel bookmark taps with React Native New Architecture (#9904) 2026-07-02 13:55:27 -07:00
handle_send_message.test.tsx Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
handle_send_message.ts Agents "RHS" view (#9318) 2026-03-16 09:48:32 -07:00
header.test.tsx Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
header.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
initial_value.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
initial_value.ts Enable exhaustive deps in the repo (#9508) 2026-02-18 11:56:16 +01:00
is_initial_sync.test.ts Mm 68767 zero persistence (#9803) (#9957) 2026-07-20 13:31:53 +03:00
is_initial_sync.ts Mm 68767 zero persistence (#9803) (#9957) 2026-07-20 13:31:53 +03:00
markdown.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
markdown.ts Show at mentions in RemoveMarkdown renderer (#7664) 2023-11-17 11:43:25 +01:00
navigate_back.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
navigate_back.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
navigation_header.test.tsx Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
navigation_header.tsx Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
notification_props.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
notification_props.ts Enable exhaustive deps in the repo (#9508) 2026-02-18 11:56:16 +01:00
persistent_notification_props.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
persistent_notification_props.ts Mobile drafts (#8280) 2025-01-13 18:40:03 +05:30
props_from_params.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
props_from_params.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
screen_transition_animation.test.ts resumes slide animation after stopping due to modal system dialog showing (#9792) 2026-05-29 06:50:57 +08:00
screen_transition_animation.ts resumes slide animation after stopping due to modal system dialog showing (#9792) 2026-05-29 06:50:57 +08:00
show_more.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
show_more.ts [Gekidou] post component tree and partial postList (#5637) 2021-09-06 08:22:55 -03:00
team_switch.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
team_switch.ts [Gekidou] perf improvement & fix upgrade path (#6302) 2022-05-24 08:45:17 -04:00
teams_loading.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
teams_loading.ts fix: app bugs surfaced by Detox RF migration (#9789) 2026-06-09 13:25:42 +05:30
throttled.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
throttled.ts Implementing the Audio Playback/Download on the chat (#7900) 2025-02-19 11:17:30 +01:00
use_external_link_handler.ts Mention, embedded link and handling of post update on offline device (#9104) 2025-09-12 14:06:58 +05:30
use_external_link.test.ts Update useExternalLink to match webapp (#8675) 2025-03-13 12:28:00 +01:00
use_external_link.ts Update useExternalLink to match webapp (#8675) 2025-03-13 12:28:00 +01:00
use_has_credentials.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
use_has_credentials.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
useCollapsibleHeader.test.tsx Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
user_timezone.test.tsx Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
user_timezone.tsx Enable exhaustive deps in the repo (#9508) 2026-02-18 11:56:16 +01:00
utils.test.tsx Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
utils.ts Add Floating Label Autocomplete Selector (#9119) 2025-10-01 13:31:16 +02:00
why_did_you_update.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
why_did_you_update.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00