From a9647a1750fc2d8c1a17f6c98016fe510ae7290d Mon Sep 17 00:00:00 2001 From: Manton Reece Date: Tue, 7 Jul 2026 09:28:47 -0500 Subject: [PATCH 1/2] Fixed future-dated posts never going away. --- src/stores/Feed.js | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/src/stores/Feed.js b/src/stores/Feed.js index 3a8d1a8..f9a119f 100644 --- a/src/stores/Feed.js +++ b/src/stores/Feed.js @@ -76,7 +76,7 @@ const HIDE_READ_POSTS_SETTINGS_KEY = 'HideReadPosts'; const FEED_TIMELINE_CACHE_DIRECTORY_NAME = 'inkwell'; const FEED_TIMELINE_CACHE_FILENAME_PREFIX = 'RecentEntries'; const FEED_ICONS_CACHE_FILENAME = 'Icons.json'; -const FEED_TIMELINE_CACHE_VERSION = 1; +const FEED_TIMELINE_CACHE_VERSION = 2; const FEED_TIMELINE_CACHE_WRITE_DELAY_MS = 240; const FEED_ICONS_CACHE_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1000; @@ -2979,21 +2979,55 @@ function get_subscription_host(subscription = null) { function resolve_published_at(entry = null) { const normalized_published_at = normalize_string(entry?.published_at); + const created_at = normalize_string(entry?.created_at); + if (normalized_published_at) { - return normalized_published_at; + return resolve_effective_timeline_date( + normalized_published_at, + created_at, + ); } const published_at = normalize_string(entry?.published); if (published_at) { - return published_at; + return resolve_effective_timeline_date(published_at, created_at); + } else if (created_at) { + return created_at; } - const created_at = normalize_string(entry?.created_at); - if (created_at) { + return new Date().toISOString(); +} + +function resolve_effective_timeline_date( + published_at = '', + created_at = '', +) { + if (created_at && is_future_timeline_day(published_at)) { return created_at; + } else { + return published_at; } +} - return new Date().toISOString(); +function is_future_timeline_day(raw_date = '') { + const date = new Date(raw_date); + if (Number.isNaN(date.getTime())) { + return false; + } + + const now = new Date(); + const today_midnight = new Date( + now.getFullYear(), + now.getMonth(), + now.getDate(), + ); + const entry_midnight = new Date( + date.getFullYear(), + date.getMonth(), + date.getDate(), + ); + + return entry_midnight.getTime() > today_midnight.getTime(); } function resolve_entry_read_state( From 0baba648a7ce35c761e76f439dc8e948e70626fd Mon Sep 17 00:00:00 2001 From: Manton Reece Date: Fri, 4 Sep 2026 22:47:38 -0500 Subject: [PATCH 2/2] Updated scopes. --- src/api/MicroBlogAuth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/MicroBlogAuth.js b/src/api/MicroBlogAuth.js index 19629eb..7b0bb19 100644 --- a/src/api/MicroBlogAuth.js +++ b/src/api/MicroBlogAuth.js @@ -4,7 +4,7 @@ export const MICRO_BLOG_AUTH_URL = 'https://micro.blog/indieauth/auth'; export const MICRO_BLOG_TOKEN_URL = 'https://micro.blog/indieauth/token'; export const MICRO_BLOG_VERIFY_URL = 'https://micro.blog/account/verify'; export const MICRO_BLOG_CLIENT_ID = 'https://micro.ink/client.json'; -export const MICRO_BLOG_SCOPE = 'create'; +export const MICRO_BLOG_SCOPE = 'read write'; export const MICRO_BLOG_REDIRECT_PATH = 'auth/callback'; export function get_micro_blog_redirect_uri() {