mattermost-mobile/app/mm-redux/store/initial_state.ts
Miguel Alatzar 7afa9aed01
[MM-23698] [MM-19559] Remove redux-offline and updated redux-persist (#4120)
* Remove redux-offline and configure redux-persist

* Fix typo

* Fix configure store

* Upgrade to redux-persist 6.0.0

* Add migration from redux-persist v4 to v6

* Replace AsyncStorage with MMKVStorage to boost storage speed

* Mock RNFastStorage

* Fix reactions test

* Fix clearing the store on logout

* Remove the need for LOGOUT_SUCCESS

* No need to pass persistConfig to middlewares()

* Remove unused imports

* Export connection

Accidentally removed this export.

* Add batch action name

Co-Authored-By: Elias Nahum <nahumhbl@gmail.com>

* Add batch action name

Co-Authored-By: Elias Nahum <nahumhbl@gmail.com>

* Add batch action name

Co-Authored-By: Elias Nahum <nahumhbl@gmail.com>

* Add batch action name

Co-Authored-By: Elias Nahum <nahumhbl@gmail.com>

* Fix delete post

* Fix leave channel

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2020-04-08 13:44:54 -07:00

266 lines
6.5 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {GlobalState} from '@mm-redux/types/store';
const state: GlobalState = {
entities: {
general: {
appState: false,
credentials: {},
config: {},
dataRetentionPolicy: {},
deviceToken: '',
license: {},
serverVersion: '',
timezones: [],
},
users: {
currentUserId: '',
isManualStatus: {},
mySessions: [],
myAudits: [],
profiles: {},
profilesInTeam: {},
profilesNotInTeam: {},
profilesWithoutTeam: new Set(),
profilesInChannel: {},
profilesNotInChannel: {},
statuses: {},
stats: {},
},
teams: {
currentTeamId: '',
teams: {},
myMembers: {},
membersInTeam: {},
stats: {},
groupsAssociatedToTeam: {},
totalCount: 0,
},
channels: {
currentChannelId: '',
channels: {},
channelsInTeam: {},
myMembers: {},
membersInChannel: {},
stats: {},
groupsAssociatedToChannel: {},
totalCount: 0,
manuallyUnread: {},
channelModerations: {},
},
posts: {
expandedURLs: {},
posts: {},
postsInChannel: {},
postsInThread: {},
pendingPostIds: [],
reactions: {},
openGraph: {},
selectedPostId: '',
currentFocusedPostId: '',
messagesHistory: {
messages: [],
index: {
post: -1,
comment: -1,
},
},
},
preferences: {
myPreferences: {},
},
bots: {
accounts: {},
},
jobs: {
jobs: {},
jobsByTypeList: {},
},
integrations: {
incomingHooks: {},
outgoingHooks: {},
oauthApps: {},
systemCommands: {},
commands: {},
},
files: {
files: {},
fileIdsByPostId: {},
},
emojis: {
customEmoji: {},
nonExistentEmoji: new Set(),
},
search: {
results: [],
current: {},
recent: {},
matches: {},
flagged: [],
pinned: {},
isSearchingTerm: false,
isSearchGettingMore: false,
},
typing: {},
roles: {
roles: {},
pending: new Set(),
},
gifs: {
categories: {
tagsList: [],
tagsDict: {},
},
cache: {
gifs: {},
updating: false,
},
search: {
searchText: '',
searchBarText: '',
resultsByTerm: {},
scrollPosition: 0,
priorLocation: null,
},
},
schemes: {
schemes: {},
},
groups: {
groups: {},
syncables: {},
members: {},
},
channelCategories: {
byId: {},
orderByTeam: {},
},
},
errors: [],
requests: {
channels: {
getAllChannels: {
status: 'not_started',
error: null,
},
getChannels: {
status: 'not_started',
error: null,
},
myChannels: {
status: 'not_started',
error: null,
},
createChannel: {
status: 'not_started',
error: null,
},
updateChannel: {
status: 'not_started',
error: null,
},
},
general: {
websocket: {
status: 'not_started',
error: null,
},
},
posts: {
createPost: {
status: 'not_started',
error: null,
},
editPost: {
status: 'not_started',
error: null,
},
getPostThread: {
status: 'not_started',
error: null,
},
},
teams: {
getMyTeams: {
status: 'not_started',
error: null,
},
getTeams: {
status: 'not_started',
error: null,
},
joinTeam: {
status: 'not_started',
error: null,
},
},
users: {
checkMfa: {
status: 'not_started',
error: null,
},
login: {
status: 'not_started',
error: null,
},
autocompleteUsers: {
status: 'not_started',
error: null,
},
updateMe: {
status: 'not_started',
error: null,
},
},
files: {
uploadFiles: {
status: 'not_started',
error: null,
},
},
roles: {
getRolesByNames: {
status: 'not_started',
error: null,
},
getRoleByName: {
status: 'not_started',
error: null,
},
getRole: {
status: 'not_started',
error: null,
},
editRole: {
status: 'not_started',
error: null,
},
},
jobs: {
createJob: {
status: 'not_started',
error: null,
},
getJob: {
status: 'not_started',
error: null,
},
getJobs: {
status: 'not_started',
error: null,
},
cancelJob: {
status: 'not_started',
error: null,
},
},
},
websocket: {
connected: false,
lastConnectAt: 0,
lastDisconnectAt: 0,
},
};
export default state;