Skip to content

Commit

Permalink
Postpone post loading in the composer till node owner setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
smelamud committed Oct 25, 2022
1 parent 69f496b commit d9b19b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/state/compose/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ import { getComposeDraftId, getComposePostingId, isComposePostingEditing } from
import { executor } from "state/executor";
import { WithContext } from "state/action-types";
import { flashBox } from "state/flashbox/actions";
import { introduced, mutuallyIntroduced } from "state/init-selectors";
import { mutuallyIntroduced } from "state/init-selectors";

export default [
executor(COMPOSE_POSTING_LOAD, "", composePostingLoadSaga, introduced),
executor(COMPOSE_POSTING_LOAD, "", composePostingLoadSaga, mutuallyIntroduced),
executor(COMPOSE_POST, null, composePostSaga),
executor(COMPOSE_DRAFT_LOAD, "", composeDraftLoadSaga, mutuallyIntroduced),
executor(COMPOSE_DRAFT_SAVE, "", composeDraftSaveSaga),
Expand Down
24 changes: 12 additions & 12 deletions src/state/compose/triggers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
import { conj, trigger } from "state/trigger";
import { DraftAddedEvent, DraftDeletedEvent, DraftUpdatedEvent, PostingUpdatedEvent } from "api/events/api-types";
import {
EVENT_HOME_DRAFT_ADDED,
EVENT_HOME_DRAFT_DELETED,
EVENT_HOME_DRAFT_UPDATED,
EVENT_NODE_POSTING_UPDATED,
EventAction
} from "api/events/actions";
import { ClientState } from "state/state";
import { getOwnerName } from "state/node/selectors";
import { CONNECTED_TO_HOME, ConnectedToHomeAction } from "state/home/actions";
import {
COMPOSE_DRAFT_LIST_ITEM_DELETED,
COMPOSE_DRAFT_SAVED,
Expand All @@ -20,7 +31,6 @@ import {
composeSharedTextLoad
} from "state/compose/actions";
import { dialogClosed, dialogOpened, GO_TO_PAGE, goToPosting, updateLocation } from "state/navigation/actions";
import { postingSet } from "state/postings/actions";
import { isAtComposePage } from "state/navigation/selectors";
import {
getComposeDraftId,
Expand All @@ -33,19 +43,9 @@ import {
isComposePostingToBeLoaded,
isComposeSharedTextToBeLoaded
} from "state/compose/selectors";
import {
EVENT_HOME_DRAFT_ADDED,
EVENT_HOME_DRAFT_DELETED,
EVENT_HOME_DRAFT_UPDATED,
EVENT_NODE_POSTING_UPDATED,
EventAction
} from "api/events/actions";
import { postingSet } from "state/postings/actions";
import { getPostingStory, hasPostingFeedReference } from "state/postings/selectors";
import { storyAdded, storyUpdated } from "state/stories/actions";
import { getOwnerName } from "state/node/selectors";
import { DraftAddedEvent, DraftDeletedEvent, DraftUpdatedEvent, PostingUpdatedEvent } from "api/events/api-types";
import { CONNECTED_TO_HOME, ConnectedToHomeAction } from "state/home/actions";
import { ClientState } from "state/state";

const isConnectionSwitch = (state: ClientState, action: ConnectedToHomeAction) => action.payload.connectionSwitch;

Expand Down

0 comments on commit d9b19b6

Please sign in to comment.