Progress on dms, code cleanup

Progress on dms, code cleanup
This commit is contained in:
mgabdev
2020-12-02 23:22:51 -05:00
parent 20d4fc09af
commit 9a43c51085
103 changed files with 3656 additions and 859 deletions

View File

@@ -12,6 +12,7 @@ export const ACCOUNTS_IMPORT = 'ACCOUNTS_IMPORT'
export const STATUS_IMPORT = 'STATUS_IMPORT'
export const STATUSES_IMPORT = 'STATUSES_IMPORT'
export const POLLS_IMPORT = 'POLLS_IMPORT'
export const CHAT_MESSAGES_IMPORT = 'CHAT_MESSAGES_IMPORT'
export const ACCOUNT_FETCH_FAIL_FOR_USERNAME_LOOKUP = 'ACCOUNT_FETCH_FAIL_FOR_USERNAME_LOOKUP'
/**
@@ -48,6 +49,11 @@ export const importPolls = (polls) => ({
polls,
})
export const importChatMessages = (chatMessages) => ({
type: CHAT_MESSAGES_IMPORT,
chatMessages,
})
export const importFetchedAccount = (account) => {
return importFetchedAccounts([account]);
}
@@ -97,7 +103,7 @@ export const importFetchedStatuses = (statuses) => (dispatch, getState) => {
}
}
statuses.forEach(processStatus)
statuses.forEach(processStatus)
dispatch(importPolls(polls))
dispatch(importFetchedAccounts(accounts))
@@ -113,3 +119,7 @@ export const importErrorWhileFetchingAccountByUsername = (username) => ({
type: ACCOUNT_FETCH_FAIL_FOR_USERNAME_LOOKUP,
username
})
export const importFetchedChatMessages = (chatMessages) => (dispatch, getState) => {
dispatch(importChatMessages(chatMessages))
}