From b09e8c85ab29cd42728cccd8b120ea1e3c97d2a4 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Mon, 15 Jan 2018 17:25:32 -0800 Subject: [PATCH] kinda really sorta working --- routes/_components/Status.html | 9 ++--- routes/_components/VirtualList.html | 25 +++++++------ routes/_components/VirtualListItem.html | 2 - routes/_utils/virtualListStore.js | 49 ++++++++++++++----------- 4 files changed, 44 insertions(+), 41 deletions(-) diff --git a/routes/_components/Status.html b/routes/_components/Status.html index 18b1ad8..be135fd 100644 --- a/routes/_components/Status.html +++ b/routes/_components/Status.html @@ -190,13 +190,10 @@ components: { Avatar }, - data: () => ({ - status: null, - }), computed: { - relativeDate: (status) => { - let date = new Date(status.created_at) - return relativeFormat.format(date) + createdAtDate: (status) => status.created_at, + relativeDate: (createdAtDate) => { + return relativeFormat.format(new Date(createdAtDate)) }, original: (status) => status.reblog ? status.reblog.account : status.account }, diff --git a/routes/_components/VirtualList.html b/routes/_components/VirtualList.html index 2aebc88..6111631 100644 --- a/routes/_components/VirtualList.html +++ b/routes/_components/VirtualList.html @@ -1,13 +1,12 @@ -<:Window bind:scrollY='scrollY' bind:innerHeight='innerHeight' /> +<:Window bind:scrollY='scrollY' bind:innerHeight='innerHeight'/>
- {{#each $visibleItems as item, index @key}} - + {{#each $visibleItems as item @key}} + {{/each}}