Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle muted and drafts correctly #20155

Merged
merged 5 commits into from Oct 5, 2019

Conversation

@mmaxim
Copy link
Member

commented Oct 5, 2019

No description provided.

mmaxim added 4 commits Oct 5, 2019
typ
@mmaxim mmaxim requested a review from keybase/react-hackers Oct 5, 2019
@chrisnojima chrisnojima self-assigned this Oct 5, 2019
@@ -941,6 +941,28 @@ export default (_state: Types.State = initialState, action: Actions): Types.Stat
case EngineGen.chat1ChatUiChatInboxLayout: {
try {
const layout: RPCChatTypes.UIInboxLayout = JSON.parse(action.payload.params.layout)
if (!draftState.inboxHasLoaded) {
// on first layout, initialize any drafts and muted status

This comment has been minimized.

Copy link
@chrisnojima

chrisnojima Oct 5, 2019

Contributor

this seems tricky to me. maybe we should remove it from the meta object so the gui doesnt' reference it and the saga that emits this can just have it as an additional payload? aka in metasReceived that has action.payload.draftMap etc

This comment has been minimized.

Copy link
@mmaxim

mmaxim Oct 5, 2019

Author Member

To make sure I understand, the steps would be:

1.) Remove isMuted and draft from Types.ConversationMeta
2.) In the saga that dispatches metasReceived, we dispatch a new action to set muted and drafts.

@mmaxim

This comment has been minimized.

Copy link
Member Author

commented Oct 5, 2019

Talked in person, there are a lot of callsites for metasReceived, so I think I will pick it up in a different PR to make it safer. The worst case isn't that bad, the meta still has this data, its just if components are relying on it solely they might have blank data until we can get the meta into the store.

@mmaxim mmaxim merged commit 28d4f81 into master Oct 5, 2019
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/jenkins/pr-head This commit cannot be built
Details
ci/circleci Your tests passed on CircleCI!
Details
@mmaxim mmaxim deleted the mike/HOTPOT-955 branch Oct 5, 2019
Copy link

left a comment

Requested to changes this files

ravikantcool2008 added a commit to ravikantcool2008/client that referenced this pull request Oct 5, 2019
This reverts commit 28d4f81.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.