From 214ab22c4ccc92ddee537204c1c29a1dacb037b8 Mon Sep 17 00:00:00 2001 From: taehoon Date: Fri, 30 Aug 2019 11:52:58 -0400 Subject: update prop binding --- src/components/timeline/timeline.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/timeline/timeline.vue') diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index 4ad51714..14ce21af 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -33,7 +33,7 @@ v-if="timeline.statusesObject[statusId]" :key="statusId + '-pinned'" class="status-fadein" - :statusoid="timeline.statusesObject[statusId]" + :statusoid="statusId" :collapsable="true" :pinned-status-ids-object="pinnedStatusIdsObject" /> @@ -43,7 +43,7 @@ v-if="!excludedStatusIdsObject[status.id]" :key="status.id" class="status-fadein" - :statusoid="status" + :statusoid="status.id" :collapsable="true" /> -- cgit v1.2.3-70-g09d2 From 9727009147d541bc8ab7083791a531b39f29c614 Mon Sep 17 00:00:00 2001 From: taehoon Date: Tue, 3 Sep 2019 13:19:14 -0400 Subject: update prop name --- .../conversation-page/conversation-page.vue | 2 +- src/components/conversation/conversation.js | 24 +++++++++++----------- src/components/timeline/timeline.vue | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src/components/timeline/timeline.vue') diff --git a/src/components/conversation-page/conversation-page.vue b/src/components/conversation-page/conversation-page.vue index 3db63343..8cc0a55f 100644 --- a/src/components/conversation-page/conversation-page.vue +++ b/src/components/conversation-page/conversation-page.vue @@ -2,7 +2,7 @@ diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index dc58cd58..10dd8eb0 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -39,7 +39,7 @@ const conversation = { } }, props: [ - 'statusoid', + 'statusId', 'collapsable', 'isPage', 'pinnedStatusIdsObject' @@ -51,17 +51,17 @@ const conversation = { }, computed: { status () { - return this.$store.state.statuses.allStatusesObject[this.statusoid] + return this.$store.state.statuses.allStatusesObject[this.statusId] }, - statusId () { + originalStatusId () { if (this.status.retweeted_status) { return this.status.retweeted_status.id } else { - return this.statusoid + return this.statusId } }, conversationId () { - return this.getConversationId(this.statusoid) + return this.getConversationId(this.statusId) }, conversation () { if (!this.status) { @@ -73,7 +73,7 @@ const conversation = { } const conversation = clone(this.$store.state.statuses.conversationsObject[this.conversationId]) - const statusIndex = findIndex(conversation, { id: this.statusId }) + const statusIndex = findIndex(conversation, { id: this.originalStatusId }) if (statusIndex !== -1) { conversation[statusIndex] = this.status } @@ -106,11 +106,11 @@ const conversation = { Status }, watch: { - statusoid (newVal, oldVal) { + statusId (newVal, oldVal) { const newConversationId = this.getConversationId(newVal) const oldConversationId = this.getConversationId(oldVal) if (newConversationId && oldConversationId && newConversationId === oldConversationId) { - this.setHighlight(this.statusId) + this.setHighlight(this.originalStatusId) } else { this.fetchConversation() } @@ -124,14 +124,14 @@ const conversation = { methods: { fetchConversation () { if (this.status) { - this.$store.state.api.backendInteractor.fetchConversation({ id: this.statusoid }) + this.$store.state.api.backendInteractor.fetchConversation({ id: this.statusId }) .then(({ ancestors, descendants }) => { this.$store.dispatch('addNewStatuses', { statuses: ancestors }) this.$store.dispatch('addNewStatuses', { statuses: descendants }) - this.setHighlight(this.statusId) + this.setHighlight(this.originalStatusId) }) } else { - this.$store.state.api.backendInteractor.fetchStatus({ id: this.statusoid }) + this.$store.state.api.backendInteractor.fetchStatus({ id: this.statusId }) .then((status) => { this.$store.dispatch('addNewStatuses', { statuses: [status] }) this.fetchConversation() @@ -142,7 +142,7 @@ const conversation = { return this.replies[id] || [] }, focused (id) { - return (this.isExpanded) && id === this.statusoid + return (this.isExpanded) && id === this.statusId }, setHighlight (id) { if (!id) return diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index 14ce21af..ba66e6da 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -33,7 +33,7 @@ v-if="timeline.statusesObject[statusId]" :key="statusId + '-pinned'" class="status-fadein" - :statusoid="statusId" + :status-id="statusId" :collapsable="true" :pinned-status-ids-object="pinnedStatusIdsObject" /> @@ -43,7 +43,7 @@ v-if="!excludedStatusIdsObject[status.id]" :key="status.id" class="status-fadein" - :statusoid="status.id" + :status-id="status.id" :collapsable="true" /> -- cgit v1.2.3-70-g09d2 From 09deb69bc78fb5cfd3d9ff2455a5632ed71dd14b Mon Sep 17 00:00:00 2001 From: taehoon Date: Fri, 13 Sep 2019 15:34:17 -0400 Subject: do not collapse muted user's posts on muted user's profile page --- src/components/conversation/conversation.js | 3 ++- src/components/conversation/conversation.vue | 1 + src/components/status/status.js | 5 +++-- src/components/timeline/timeline.js | 3 ++- src/components/timeline/timeline.vue | 2 ++ src/components/user_profile/user_profile.vue | 1 + 6 files changed, 11 insertions(+), 4 deletions(-) (limited to 'src/components/timeline/timeline.vue') diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index 10dd8eb0..44dc49bc 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -42,7 +42,8 @@ const conversation = { 'statusId', 'collapsable', 'isPage', - 'pinnedStatusIdsObject' + 'pinnedStatusIdsObject', + 'forceUnmute' ], created () { if (this.isPage) { diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue index f184c071..ba138189 100644 --- a/src/components/conversation/conversation.vue +++ b/src/components/conversation/conversation.vue @@ -26,6 +26,7 @@ :in-conversation="isExpanded" :highlight="getHighlight()" :replies="getReplies(status.id)" + :force-unmute="forceUnmute" class="status-fadein panel-body" @goto="setHighlight" @toggleExpanded="toggleExpanded" diff --git a/src/components/status/status.js b/src/components/status/status.js index 502d9583..474a0480 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -29,7 +29,8 @@ const Status = { 'isPreview', 'noHeading', 'inlineExpanded', - 'showPinned' + 'showPinned', + 'forceUnmute' ], data () { return { @@ -117,7 +118,7 @@ const Status = { return hits }, - muted () { return !this.unmuted && (this.status.user.muted || this.muteWordHits.length > 0) }, + muted () { return !this.forceUnmute && !this.unmuted && (this.status.user.muted || this.muteWordHits.length > 0) }, hideFilteredStatuses () { return typeof this.$store.state.config.hideFilteredStatuses === 'undefined' ? this.$store.state.instance.hideFilteredStatuses diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 8df48f7f..3d5f9de8 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -25,7 +25,8 @@ const Timeline = { 'tag', 'embedded', 'count', - 'pinnedStatusIds' + 'pinnedStatusIds', + 'forceUnmute' ], data () { return { diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index ba66e6da..b89f505a 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -36,6 +36,7 @@ :status-id="statusId" :collapsable="true" :pinned-status-ids-object="pinnedStatusIdsObject" + :force-unmute="forceUnmute" /> diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue index 42516916..c380d2dc 100644 --- a/src/components/user_profile/user_profile.vue +++ b/src/components/user_profile/user_profile.vue @@ -26,6 +26,7 @@ timeline-name="user" :user-id="userId" :pinned-status-ids="user.pinnedStatusIds" + :force-unmute="true" />
Date: Fri, 13 Sep 2019 16:55:17 -0400 Subject: do not change word based muting logic --- src/components/conversation/conversation.js | 2 +- src/components/conversation/conversation.vue | 2 +- src/components/status/status.js | 4 ++-- src/components/timeline/timeline.js | 2 +- src/components/timeline/timeline.vue | 4 ++-- src/components/user_profile/user_profile.vue | 5 +++-- 6 files changed, 10 insertions(+), 9 deletions(-) (limited to 'src/components/timeline/timeline.vue') diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js index 44dc49bc..72ee9c39 100644 --- a/src/components/conversation/conversation.js +++ b/src/components/conversation/conversation.js @@ -43,7 +43,7 @@ const conversation = { 'collapsable', 'isPage', 'pinnedStatusIdsObject', - 'forceUnmute' + 'inProfile' ], created () { if (this.isPage) { diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue index ba138189..0f1de55f 100644 --- a/src/components/conversation/conversation.vue +++ b/src/components/conversation/conversation.vue @@ -26,7 +26,7 @@ :in-conversation="isExpanded" :highlight="getHighlight()" :replies="getReplies(status.id)" - :force-unmute="forceUnmute" + :in-profile="inProfile" class="status-fadein panel-body" @goto="setHighlight" @toggleExpanded="toggleExpanded" diff --git a/src/components/status/status.js b/src/components/status/status.js index 474a0480..e8966f47 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -30,7 +30,7 @@ const Status = { 'noHeading', 'inlineExpanded', 'showPinned', - 'forceUnmute' + 'inProfile' ], data () { return { @@ -118,7 +118,7 @@ const Status = { return hits }, - muted () { return !this.forceUnmute && !this.unmuted && (this.status.user.muted || this.muteWordHits.length > 0) }, + muted () { return !this.unmuted && ((!this.inProfile && this.status.user.muted) || this.muteWordHits.length > 0) }, hideFilteredStatuses () { return typeof this.$store.state.config.hideFilteredStatuses === 'undefined' ? this.$store.state.instance.hideFilteredStatuses diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 3d5f9de8..0594576c 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -26,7 +26,7 @@ const Timeline = { 'embedded', 'count', 'pinnedStatusIds', - 'forceUnmute' + 'inProfile' ], data () { return { diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index b89f505a..f1d3903a 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -36,7 +36,7 @@ :status-id="statusId" :collapsable="true" :pinned-status-ids-object="pinnedStatusIdsObject" - :force-unmute="forceUnmute" + :in-profile="inProfile" />
diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue index f463eea5..14082e83 100644 --- a/src/components/user_profile/user_profile.vue +++ b/src/components/user_profile/user_profile.vue @@ -26,7 +26,7 @@ timeline-name="user" :user-id="userId" :pinned-status-ids="user.pinnedStatusIds" - :force-unmute="true" + :in-profile="true" />
-- cgit v1.2.3-70-g09d2