mattermost-mobile/app/constants/events.ts
Kyriakos Z b2d838d3da
MM-37110: handle toggling of CRT feature (#6382)
* MM-37110: handle toggling of CRT feature

When a user toggles CRT on/off the app should truncate affected tables,
and re-fetch data.

Truncated tables:
- POST
- POSTS_IN_CHANNEL
- POSTS_IN_THREAD
- THREAD
- THREADS_IN_TEAM
- THREAD_PARTICIPANT
- MY_CHANNEL

After truncation `entry` is called again. We must make sure though that
we save the CRT change before calling `entry` again, or we end up with
infinite recursion.

PS the UI seems to handle the change rather good

* Fixes appEntry and popToRoot

* Small refactor

* Fixes since param on appEntry

* Further refactoring

* Delete unneeded return type

* Removes shouldPopToRoot from appEntry

* Addresses review comments
2022-07-07 12:19:02 +02:00

31 lines
865 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import keyMirror from '@utils/key_mirror';
export default keyMirror({
ACCOUNT_SELECT_TABLET_VIEW: null,
CHANNEL_ARCHIVED: null,
CLOSE_BOTTOM_SHEET: null,
CONFIG_CHANGED: null,
FETCHING_POSTS: null,
FREEZE_SCREEN: null,
GALLERY_ACTIONS: null,
LEAVE_CHANNEL: null,
LEAVE_TEAM: null,
LOADING_CHANNEL_POSTS: null,
NOTIFICATION_ERROR: null,
PAUSE_KEYBOARD_TRACKING_VIEW: null,
SERVER_LOGOUT: null,
SERVER_VERSION_CHANGED: null,
TAB_BAR_VISIBLE: null,
TEAM_LOAD_ERROR: null,
TEAM_SWITCH: null,
USER_TYPING: null,
USER_STOP_TYPING: null,
POST_LIST_SCROLL_TO_BOTTOM: null,
SWIPEABLE: null,
ITEM_IN_VIEWPORT: null,
SEND_TO_POST_DRAFT: null,
CRT_TOGGLED: null,
});