mattermost-mobile/app/store/initial_state.js
Anurag Shivarathri a81b56212e
MM-38784, MM-38409 New messages line in threads screen & Pull to refresh for global threads screen (#5690)
* New messages line in threads & Pull to refresh for global threads

* Updated snapshot

* Using postlist's RefreshControl component

* Updated threadlist snapshot

* Reverting snapshot

* Updated Snapshots

* Snapshots updated

* Added 'thread last viewed at' to handle new messages line correctly

* Lint fix

* Updated snapshots

* Reverted comparision check

* Remove unused code

* Batching actions

* Do not add new message line for self messages

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-10-07 15:14:34 +05:30

171 lines
3.9 KiB
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import Config from '@assets/config.json';
const state = {
app: {
version: '',
build: '',
},
entities: {
general: {
appState: false,
credentials: {},
config: {},
dataRetention: {
policies: {},
lastCleanUpAt: null,
},
deviceToken: '',
license: {},
serverVersion: '',
},
users: {
currentUserId: '',
mySessions: [],
profiles: {},
profilesInTeam: {},
profilesInChannel: {},
profilesNotInChannel: {},
statuses: {},
},
teams: {
currentTeamId: '',
teams: {},
myMembers: {},
membersInTeam: {},
stats: {},
},
channels: {
currentChannelId: '',
channels: {},
myMembers: {},
stats: {},
},
posts: {
posts: {},
postsInChannel: {},
postsInThread: {},
selectedPostId: '',
currentFocusedPostId: '',
},
threads: {
threads: {},
threadsInTeam: {},
counts: {},
},
preferences: {
myPreferences: {},
},
search: {
recent: [],
},
typing: {},
},
errors: [],
requests: {
channels: {
getChannels: {
status: 'not_started',
error: null,
},
createChannel: {
status: 'not_started',
error: null,
},
updateChannel: {
status: 'not_started',
error: null,
},
myChannels: {
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: {
login: {
status: 'not_started',
error: null,
},
autocompleteUsers: {
status: 'not_started',
error: null,
},
updateMe: {
status: 'not_started',
error: null,
},
},
},
device: {
connection: true,
},
views: {
channel: {
drafts: {},
},
i18n: {
locale: '',
},
root: {
deepLinkURL: '',
hydrationComplete: false,
},
selectServer: {
serverUrl: Config.DefaultServerUrl,
},
team: {
lastTeamId: '',
},
threads: {
lastViewedAt: {},
viewingGlobalThreads: false,
viewingGlobalThreadsUnreads: false,
},
thread: {
drafts: {},
},
},
websocket: {
connected: false,
lastConnectAt: 0,
lastDisconnectAt: 0,
},
};
export default state;