From caed89f0ae64217602a2832bbf2b5df9b66c0999 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 25 Apr 2021 13:44:50 +0300 Subject: destroyed -> unmounted --- src/components/timeline/timeline.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/timeline/timeline.js') diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 44f749c3..b5a45926 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -122,7 +122,7 @@ const Timeline = { window.addEventListener('keydown', this.handleShortKey) setTimeout(this.determineVisibleStatuses, 250) }, - destroyed () { + unmounted () { window.removeEventListener('scroll', this.handleScroll) window.removeEventListener('keydown', this.handleShortKey) if (typeof document.hidden !== 'undefined') document.removeEventListener('visibilitychange', this.handleVisibilityChange, false) -- cgit v1.2.3-70-g09d2 From a31ff20f50906f70253bf43f4548c0f5b0ab8db4 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 20 Feb 2022 00:36:21 +0200 Subject: lol, lmao, that was some shit, this is much easier and works all the time --- src/components/timeline/timeline.js | 18 ------------------ src/components/timeline/timeline.vue | 2 +- src/modules/statuses.js | 32 ++------------------------------ 3 files changed, 3 insertions(+), 49 deletions(-) (limited to 'src/components/timeline/timeline.js') diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 44f749c3..04f0e7d6 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -12,19 +12,6 @@ library.add( faCog ) -export const getExcludedStatusIdsByPinning = (statuses, pinnedStatusIds) => { - const ids = [] - if (pinnedStatusIds && pinnedStatusIds.length > 0) { - for (let status of statuses) { - if (!pinnedStatusIds.includes(status.id)) { - break - } - ids.push(status.id) - } - } - return ids -} - const Timeline = { props: [ 'timeline', @@ -77,11 +64,6 @@ const Timeline = { } }, // id map of statuses which need to be hidden in the main list due to pinning logic - excludedStatusIdsObject () { - const ids = getExcludedStatusIdsByPinning(this.timeline.visibleStatuses, this.pinnedStatusIds) - // Convert id array to object - return keyBy(ids) - }, pinnedStatusIdsObject () { return keyBy(this.pinnedStatusIds) }, diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index c8cd38e0..3ba5e8b5 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -37,7 +37,7 @@