diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue
index 0cb4b3ef..23795bec 100644
--- a/src/components/timeline/timeline.vue
+++ b/src/components/timeline/timeline.vue
@@ -35,7 +35,7 @@
class="status-fadein"
:statusoid="timeline.statusesObject[statusId]"
:collapsable="true"
- :show-pinned="true"
+ :pinned-status-ids="pinnedStatusIds"
/>
From 1146119d6af4bdd3d15bd635806520df78504ad2 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Thu, 15 Aug 2019 13:16:55 -0400
Subject: [PATCH 2/3] generate idObj at timeline level
---
src/components/conversation/conversation.js | 7 ++-----
src/components/conversation/conversation.vue | 2 +-
src/components/timeline/timeline.js | 3 +++
src/components/timeline/timeline.vue | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js
index cb4db8ea..19dcb257 100644
--- a/src/components/conversation/conversation.js
+++ b/src/components/conversation/conversation.js
@@ -1,4 +1,4 @@
-import { reduce, filter, findIndex, clone, keyBy } from 'lodash'
+import { reduce, filter, findIndex, clone } from 'lodash'
import Status from '../status/status.vue'
const sortById = (a, b) => {
@@ -42,7 +42,7 @@ const conversation = {
'statusoid',
'collapsable',
'isPage',
- 'pinnedStatusIds'
+ 'pinnedStatusIdsObject'
],
created () {
if (this.isPage) {
@@ -104,9 +104,6 @@ const conversation = {
},
isExpanded () {
return this.expanded || this.isPage
- },
- pinnedStatusIdsObject () {
- return keyBy(this.pinnedStatusIds, id => id)
}
},
components: {
diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue
index d4e199c1..f184c071 100644
--- a/src/components/conversation/conversation.vue
+++ b/src/components/conversation/conversation.vue
@@ -21,7 +21,7 @@
:inline-expanded="collapsable && isExpanded"
:statusoid="status"
:expandable="!isExpanded"
- :show-pinned="pinnedStatusIdsObject[status.id]"
+ :show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
:focused="focused(status.id)"
:in-conversation="isExpanded"
:highlight="getHighlight()"
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js
index aac3869f..2e317e8e 100644
--- a/src/components/timeline/timeline.js
+++ b/src/components/timeline/timeline.js
@@ -59,6 +59,9 @@ const Timeline = {
const ids = getExcludedStatusIdsByPinning(this.timeline.visibleStatuses, this.pinnedStatusIds)
// Convert id array to object
return keyBy(ids, id => id)
+ },
+ pinnedStatusIdsObject () {
+ return keyBy(this.pinnedStatusIds, id => id)
}
},
components: {
diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue
index 23795bec..4ad51714 100644
--- a/src/components/timeline/timeline.vue
+++ b/src/components/timeline/timeline.vue
@@ -35,7 +35,7 @@
class="status-fadein"
:statusoid="timeline.statusesObject[statusId]"
:collapsable="true"
- :pinned-status-ids="pinnedStatusIds"
+ :pinned-status-ids-object="pinnedStatusIdsObject"
/>
From 4bedbfea3c315b67b1d5d0818880dde46b9af0b5 Mon Sep 17 00:00:00 2001
From: taehoon
Date: Sat, 17 Aug 2019 22:10:01 -0400
Subject: [PATCH 3/3] update keyBy
---
src/components/timeline/timeline.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js
index 2e317e8e..8df48f7f 100644
--- a/src/components/timeline/timeline.js
+++ b/src/components/timeline/timeline.js
@@ -58,10 +58,10 @@ const Timeline = {
excludedStatusIdsObject () {
const ids = getExcludedStatusIdsByPinning(this.timeline.visibleStatuses, this.pinnedStatusIds)
// Convert id array to object
- return keyBy(ids, id => id)
+ return keyBy(ids)
},
pinnedStatusIdsObject () {
- return keyBy(this.pinnedStatusIds, id => id)
+ return keyBy(this.pinnedStatusIds)
}
},
components: {