From c462bcfe687519d762ccda2592b2a7d30789eddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Curcio?= Date: Mon, 1 Oct 2018 14:33:41 -0300 Subject: [PATCH] Setting COMMENTS as activeTab --- src/core/client/stream/mutations/SetCommentIDMutation.ts | 1 + .../tabs/profile/containers/CommentsHistoryContainer.tsx | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/core/client/stream/mutations/SetCommentIDMutation.ts b/src/core/client/stream/mutations/SetCommentIDMutation.ts index 4bacb1181..eb356286b 100644 --- a/src/core/client/stream/mutations/SetCommentIDMutation.ts +++ b/src/core/client/stream/mutations/SetCommentIDMutation.ts @@ -18,6 +18,7 @@ export async function commit( return commitLocalUpdate(environment, store => { const record = store.get(LOCAL_ID)!; record.setValue(input.id, "commentID"); + record.setValue("COMMENTS", "activeTab"); if (pym) { // This sets the comment id on the parent url. pym.sendMessage("setCommentID", input.id || ""); diff --git a/src/core/client/stream/tabs/profile/containers/CommentsHistoryContainer.tsx b/src/core/client/stream/tabs/profile/containers/CommentsHistoryContainer.tsx index 18aa0926f..8eaa949fd 100644 --- a/src/core/client/stream/tabs/profile/containers/CommentsHistoryContainer.tsx +++ b/src/core/client/stream/tabs/profile/containers/CommentsHistoryContainer.tsx @@ -1,17 +1,12 @@ import React from "react"; import { graphql } from "react-relay"; -import { - withFragmentContainer, - withLocalStateContainer, -} from "talk-framework/lib/relay"; +import { withFragmentContainer } from "talk-framework/lib/relay"; import { CommentsHistoryContainer_me as CommentsData } from "talk-stream/__generated__/CommentsHistoryContainer_me.graphql"; -import { CommentsHistoryContainerLocal as Local } from "talk-stream/__generated__/CommentsHistoryContainerLocal.graphql"; -import CommentsHistory from "../components/CommentsHistory"; - import { SetCommentIDMutation, withSetCommentIDMutation, } from "talk-stream/mutations"; +import CommentsHistory from "../components/CommentsHistory"; interface CommentsHistoryContainerProps { setCommentID: SetCommentIDMutation;