|
|
|
import api from '../api';
|
|
|
|
import openDB from '../storage/db';
|
|
|
|
import { evictStatus } from '../storage/modifier';
|
|
|
|
|
|
|
|
import { deleteFromTimelines } from './timelines';
|
|
|
|
import { importFetchedStatus, importFetchedStatuses, importAccount, importStatus } from './importer';
|
|
|
|
import { ensureComposeIsVisible } from './compose';
|
|
|
|
|
|
|
|
export const STATUS_FETCH_REQUEST = 'STATUS_FETCH_REQUEST';
|
|
|
|
export const STATUS_FETCH_SUCCESS = 'STATUS_FETCH_SUCCESS';
|
|
|
|
export const STATUS_FETCH_FAIL = 'STATUS_FETCH_FAIL';
|
|
|
|
|
|
|
|
export const STATUS_DELETE_REQUEST = 'STATUS_DELETE_REQUEST';
|
|
|
|
export const STATUS_DELETE_SUCCESS = 'STATUS_DELETE_SUCCESS';
|
|
|
|
export const STATUS_DELETE_FAIL = 'STATUS_DELETE_FAIL';
|
|
|
|
|
|
|
|
export const CONTEXT_FETCH_REQUEST = 'CONTEXT_FETCH_REQUEST';
|
|
|
|
export const CONTEXT_FETCH_SUCCESS = 'CONTEXT_FETCH_SUCCESS';
|
|
|
|
export const CONTEXT_FETCH_FAIL = 'CONTEXT_FETCH_FAIL';
|
|
|
|
|
Feature conversations muting (#3017)
* Add <ostatus:conversation /> tag to Atom input/output
Only uses ref attribute (not href) because href would be
the alternate link that's always included also.
Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.
* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute
Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle
* Display "Dismiss notifications" on all statuses in notifications column, not just own
* Add "muted" as a boolean attribute on statuses JSON
For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested
Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column
* Up max class length
* Remove pending test for conversation mute
* Add tests, clean up
* Rename to "mute conversation" and "unmute conversation"
* Raise validation error when trying to mute/unmute status without conversation
8 years ago
|
|
|
export const STATUS_MUTE_REQUEST = 'STATUS_MUTE_REQUEST';
|
|
|
|
export const STATUS_MUTE_SUCCESS = 'STATUS_MUTE_SUCCESS';
|
|
|
|
export const STATUS_MUTE_FAIL = 'STATUS_MUTE_FAIL';
|
|
|
|
|
|
|
|
export const STATUS_UNMUTE_REQUEST = 'STATUS_UNMUTE_REQUEST';
|
|
|
|
export const STATUS_UNMUTE_SUCCESS = 'STATUS_UNMUTE_SUCCESS';
|
|
|
|
export const STATUS_UNMUTE_FAIL = 'STATUS_UNMUTE_FAIL';
|
|
|
|
|
|
|
|
export const STATUS_REVEAL = 'STATUS_REVEAL';
|
|
|
|
export const STATUS_HIDE = 'STATUS_HIDE';
|
|
|
|
|
|
|
|
export const REDRAFT = 'REDRAFT';
|
|
|
|
|
|
|
|
export function fetchStatusRequest(id, skipLoading) {
|
|
|
|
return {
|
|
|
|
type: STATUS_FETCH_REQUEST,
|
|
|
|
id,
|
|
|
|
skipLoading,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
function getFromDB(dispatch, getState, accountIndex, index, id) {
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
const request = index.get(id);
|
|
|
|
|
|
|
|
request.onerror = reject;
|
|
|
|
|
|
|
|
request.onsuccess = () => {
|
|
|
|
const promises = [];
|
|
|
|
|
|
|
|
if (!request.result) {
|
|
|
|
reject();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
dispatch(importStatus(request.result));
|
|
|
|
|
|
|
|
if (getState().getIn(['accounts', request.result.account], null) === null) {
|
|
|
|
promises.push(new Promise((accountResolve, accountReject) => {
|
|
|
|
const accountRequest = accountIndex.get(request.result.account);
|
|
|
|
|
|
|
|
accountRequest.onerror = accountReject;
|
|
|
|
accountRequest.onsuccess = () => {
|
|
|
|
if (!request.result) {
|
|
|
|
accountReject();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
dispatch(importAccount(accountRequest.result));
|
|
|
|
accountResolve();
|
|
|
|
};
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (request.result.reblog && getState().getIn(['statuses', request.result.reblog], null) === null) {
|
|
|
|
promises.push(getFromDB(dispatch, getState, accountIndex, index, request.result.reblog));
|
|
|
|
}
|
|
|
|
|
|
|
|
resolve(Promise.all(promises));
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export function fetchStatus(id) {
|
|
|
|
return (dispatch, getState) => {
|
|
|
|
const skipLoading = getState().getIn(['statuses', id], null) !== null;
|
|
|
|
|
|
|
|
dispatch(fetchContext(id));
|
|
|
|
|
|
|
|
if (skipLoading) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
dispatch(fetchStatusRequest(id, skipLoading));
|
|
|
|
|
|
|
|
openDB().then(db => {
|
|
|
|
const transaction = db.transaction(['accounts', 'statuses'], 'read');
|
|
|
|
const accountIndex = transaction.objectStore('accounts').index('id');
|
|
|
|
const index = transaction.objectStore('statuses').index('id');
|
|
|
|
|
|
|
|
return getFromDB(dispatch, getState, accountIndex, index, id).then(() => {
|
|
|
|
db.close();
|
|
|
|
}, error => {
|
|
|
|
db.close();
|
|
|
|
throw error;
|
|
|
|
});
|
|
|
|
}).then(() => {
|
|
|
|
dispatch(fetchStatusSuccess(skipLoading));
|
|
|
|
}, () => api(getState).get(`/api/v1/statuses/${id}`).then(response => {
|
|
|
|
dispatch(importFetchedStatus(response.data));
|
|
|
|
dispatch(fetchStatusSuccess(skipLoading));
|
|
|
|
})).catch(error => {
|
|
|
|
dispatch(fetchStatusFail(id, error, skipLoading));
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function fetchStatusSuccess(skipLoading) {
|
|
|
|
return {
|
|
|
|
type: STATUS_FETCH_SUCCESS,
|
|
|
|
skipLoading,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function fetchStatusFail(id, error, skipLoading) {
|
|
|
|
return {
|
|
|
|
type: STATUS_FETCH_FAIL,
|
|
|
|
id,
|
|
|
|
error,
|
|
|
|
skipLoading,
|
|
|
|
skipAlert: true,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function redraft(status, raw_text) {
|
|
|
|
return {
|
|
|
|
type: REDRAFT,
|
|
|
|
status,
|
|
|
|
raw_text,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function deleteStatus(id, routerHistory, withRedraft = false) {
|
|
|
|
return (dispatch, getState) => {
|
|
|
|
let status = getState().getIn(['statuses', id]);
|
|
|
|
|
|
|
|
if (status.get('poll')) {
|
|
|
|
status = status.set('poll', getState().getIn(['polls', status.get('poll')]));
|
|
|
|
}
|
|
|
|
|
|
|
|
dispatch(deleteStatusRequest(id));
|
|
|
|
|
|
|
|
api(getState).delete(`/api/v1/statuses/${id}`).then(response => {
|
|
|
|
evictStatus(id);
|
|
|
|
dispatch(deleteStatusSuccess(id));
|
|
|
|
dispatch(deleteFromTimelines(id));
|
|
|
|
|
|
|
|
if (withRedraft) {
|
|
|
|
dispatch(redraft(status, response.data.text));
|
|
|
|
ensureComposeIsVisible(getState, routerHistory);
|
|
|
|
}
|
|
|
|
}).catch(error => {
|
|
|
|
dispatch(deleteStatusFail(id, error));
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function deleteStatusRequest(id) {
|
|
|
|
return {
|
|
|
|
type: STATUS_DELETE_REQUEST,
|
|
|
|
id: id,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function deleteStatusSuccess(id) {
|
|
|
|
return {
|
|
|
|
type: STATUS_DELETE_SUCCESS,
|
|
|
|
id: id,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function deleteStatusFail(id, error) {
|
|
|
|
return {
|
|
|
|
type: STATUS_DELETE_FAIL,
|
|
|
|
id: id,
|
|
|
|
error: error,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function fetchContext(id) {
|
|
|
|
return (dispatch, getState) => {
|
|
|
|
dispatch(fetchContextRequest(id));
|
|
|
|
|
|
|
|
api(getState).get(`/api/v1/statuses/${id}/context`).then(response => {
|
|
|
|
dispatch(importFetchedStatuses(response.data.ancestors.concat(response.data.descendants)));
|
|
|
|
dispatch(fetchContextSuccess(id, response.data.ancestors, response.data.descendants));
|
|
|
|
|
|
|
|
}).catch(error => {
|
|
|
|
if (error.response && error.response.status === 404) {
|
|
|
|
dispatch(deleteFromTimelines(id));
|
|
|
|
}
|
|
|
|
|
|
|
|
dispatch(fetchContextFail(id, error));
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function fetchContextRequest(id) {
|
|
|
|
return {
|
|
|
|
type: CONTEXT_FETCH_REQUEST,
|
|
|
|
id,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function fetchContextSuccess(id, ancestors, descendants) {
|
|
|
|
return {
|
|
|
|
type: CONTEXT_FETCH_SUCCESS,
|
|
|
|
id,
|
|
|
|
ancestors,
|
|
|
|
descendants,
|
|
|
|
statuses: ancestors.concat(descendants),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function fetchContextFail(id, error) {
|
|
|
|
return {
|
|
|
|
type: CONTEXT_FETCH_FAIL,
|
|
|
|
id,
|
|
|
|
error,
|
|
|
|
skipAlert: true,
|
|
|
|
};
|
|
|
|
};
|
Feature conversations muting (#3017)
* Add <ostatus:conversation /> tag to Atom input/output
Only uses ref attribute (not href) because href would be
the alternate link that's always included also.
Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.
* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute
Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle
* Display "Dismiss notifications" on all statuses in notifications column, not just own
* Add "muted" as a boolean attribute on statuses JSON
For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested
Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column
* Up max class length
* Remove pending test for conversation mute
* Add tests, clean up
* Rename to "mute conversation" and "unmute conversation"
* Raise validation error when trying to mute/unmute status without conversation
8 years ago
|
|
|
|
|
|
|
export function muteStatus(id) {
|
|
|
|
return (dispatch, getState) => {
|
|
|
|
dispatch(muteStatusRequest(id));
|
|
|
|
|
|
|
|
api(getState).post(`/api/v1/statuses/${id}/mute`).then(() => {
|
Feature conversations muting (#3017)
* Add <ostatus:conversation /> tag to Atom input/output
Only uses ref attribute (not href) because href would be
the alternate link that's always included also.
Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.
* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute
Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle
* Display "Dismiss notifications" on all statuses in notifications column, not just own
* Add "muted" as a boolean attribute on statuses JSON
For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested
Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column
* Up max class length
* Remove pending test for conversation mute
* Add tests, clean up
* Rename to "mute conversation" and "unmute conversation"
* Raise validation error when trying to mute/unmute status without conversation
8 years ago
|
|
|
dispatch(muteStatusSuccess(id));
|
|
|
|
}).catch(error => {
|
|
|
|
dispatch(muteStatusFail(id, error));
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function muteStatusRequest(id) {
|
|
|
|
return {
|
|
|
|
type: STATUS_MUTE_REQUEST,
|
|
|
|
id,
|
Feature conversations muting (#3017)
* Add <ostatus:conversation /> tag to Atom input/output
Only uses ref attribute (not href) because href would be
the alternate link that's always included also.
Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.
* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute
Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle
* Display "Dismiss notifications" on all statuses in notifications column, not just own
* Add "muted" as a boolean attribute on statuses JSON
For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested
Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column
* Up max class length
* Remove pending test for conversation mute
* Add tests, clean up
* Rename to "mute conversation" and "unmute conversation"
* Raise validation error when trying to mute/unmute status without conversation
8 years ago
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function muteStatusSuccess(id) {
|
|
|
|
return {
|
|
|
|
type: STATUS_MUTE_SUCCESS,
|
|
|
|
id,
|
Feature conversations muting (#3017)
* Add <ostatus:conversation /> tag to Atom input/output
Only uses ref attribute (not href) because href would be
the alternate link that's always included also.
Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.
* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute
Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle
* Display "Dismiss notifications" on all statuses in notifications column, not just own
* Add "muted" as a boolean attribute on statuses JSON
For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested
Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column
* Up max class length
* Remove pending test for conversation mute
* Add tests, clean up
* Rename to "mute conversation" and "unmute conversation"
* Raise validation error when trying to mute/unmute status without conversation
8 years ago
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function muteStatusFail(id, error) {
|
|
|
|
return {
|
|
|
|
type: STATUS_MUTE_FAIL,
|
|
|
|
id,
|
|
|
|
error,
|
Feature conversations muting (#3017)
* Add <ostatus:conversation /> tag to Atom input/output
Only uses ref attribute (not href) because href would be
the alternate link that's always included also.
Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.
* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute
Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle
* Display "Dismiss notifications" on all statuses in notifications column, not just own
* Add "muted" as a boolean attribute on statuses JSON
For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested
Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column
* Up max class length
* Remove pending test for conversation mute
* Add tests, clean up
* Rename to "mute conversation" and "unmute conversation"
* Raise validation error when trying to mute/unmute status without conversation
8 years ago
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function unmuteStatus(id) {
|
|
|
|
return (dispatch, getState) => {
|
|
|
|
dispatch(unmuteStatusRequest(id));
|
|
|
|
|
|
|
|
api(getState).post(`/api/v1/statuses/${id}/unmute`).then(() => {
|
Feature conversations muting (#3017)
* Add <ostatus:conversation /> tag to Atom input/output
Only uses ref attribute (not href) because href would be
the alternate link that's always included also.
Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.
* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute
Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle
* Display "Dismiss notifications" on all statuses in notifications column, not just own
* Add "muted" as a boolean attribute on statuses JSON
For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested
Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column
* Up max class length
* Remove pending test for conversation mute
* Add tests, clean up
* Rename to "mute conversation" and "unmute conversation"
* Raise validation error when trying to mute/unmute status without conversation
8 years ago
|
|
|
dispatch(unmuteStatusSuccess(id));
|
|
|
|
}).catch(error => {
|
|
|
|
dispatch(unmuteStatusFail(id, error));
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function unmuteStatusRequest(id) {
|
|
|
|
return {
|
|
|
|
type: STATUS_UNMUTE_REQUEST,
|
|
|
|
id,
|
Feature conversations muting (#3017)
* Add <ostatus:conversation /> tag to Atom input/output
Only uses ref attribute (not href) because href would be
the alternate link that's always included also.
Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.
* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute
Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle
* Display "Dismiss notifications" on all statuses in notifications column, not just own
* Add "muted" as a boolean attribute on statuses JSON
For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested
Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column
* Up max class length
* Remove pending test for conversation mute
* Add tests, clean up
* Rename to "mute conversation" and "unmute conversation"
* Raise validation error when trying to mute/unmute status without conversation
8 years ago
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function unmuteStatusSuccess(id) {
|
|
|
|
return {
|
|
|
|
type: STATUS_UNMUTE_SUCCESS,
|
|
|
|
id,
|
Feature conversations muting (#3017)
* Add <ostatus:conversation /> tag to Atom input/output
Only uses ref attribute (not href) because href would be
the alternate link that's always included also.
Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.
* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute
Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle
* Display "Dismiss notifications" on all statuses in notifications column, not just own
* Add "muted" as a boolean attribute on statuses JSON
For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested
Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column
* Up max class length
* Remove pending test for conversation mute
* Add tests, clean up
* Rename to "mute conversation" and "unmute conversation"
* Raise validation error when trying to mute/unmute status without conversation
8 years ago
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function unmuteStatusFail(id, error) {
|
|
|
|
return {
|
|
|
|
type: STATUS_UNMUTE_FAIL,
|
|
|
|
id,
|
|
|
|
error,
|
Feature conversations muting (#3017)
* Add <ostatus:conversation /> tag to Atom input/output
Only uses ref attribute (not href) because href would be
the alternate link that's always included also.
Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.
* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute
Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle
* Display "Dismiss notifications" on all statuses in notifications column, not just own
* Add "muted" as a boolean attribute on statuses JSON
For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested
Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column
* Up max class length
* Remove pending test for conversation mute
* Add tests, clean up
* Rename to "mute conversation" and "unmute conversation"
* Raise validation error when trying to mute/unmute status without conversation
8 years ago
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function hideStatus(ids) {
|
|
|
|
if (!Array.isArray(ids)) {
|
|
|
|
ids = [ids];
|
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
type: STATUS_HIDE,
|
|
|
|
ids,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export function revealStatus(ids) {
|
|
|
|
if (!Array.isArray(ids)) {
|
|
|
|
ids = [ids];
|
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
type: STATUS_REVEAL,
|
|
|
|
ids,
|
|
|
|
};
|
|
|
|
};
|