Refactor watch history helpers to new module

This commit is contained in:
thePR0M3TH3AN committed 2025-10-22 14:08:47 -04:00
1 parent 67715ffc7a
commit a5562b4707
5 files changed
+10 -16

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
// js/feedEngine/watchHistoryFeed.js
import { pointerKey, normalizePointerInput } from "../nostr.js";
import { pointerKey, normalizePointerInput } from "../nostr/watchHistory.js";
import watchHistoryService from "../watchHistoryService.js";
import nostrService from "../services/nostrService.js";
import { createWatchHistoryMetadataResolver } from "../watchHistoryMetadata.js";
+2 -6
View File
@@ -1,12 +1,8 @@
// js/historyView.js
import watchHistoryService from "./watchHistoryService.js";
import {
pointerKey,
normalizePointerInput,
nostrClient,
updateWatchHistoryList
} from "./nostr.js";
import { nostrClient, updateWatchHistoryList } from "./nostr.js";
import { pointerKey, normalizePointerInput } from "./nostr/watchHistory.js";
import {
WATCH_HISTORY_BATCH_RESOLVE,
WATCH_HISTORY_BATCH_PAGE_SIZE
+1 -1
View File
@@ -2,7 +2,7 @@ import { isDevMode } from "../config.js";
import {
normalizePointerInput,
pointerKey as derivePointerKey,
} from "../nostr.js";
} from "../nostr/watchHistory.js";
import { normalizeDesignSystemContext } from "../designSystem.js";
import { devLogger } from "../utils/logger.js";
+2 -3
View File
@@ -1,12 +1,11 @@
// js/watchHistoryService.js
import { nostrClient, requestDefaultExtensionPermissions } from "./nostr.js";
import {
nostrClient,
normalizePointerInput,
pointerKey,
normalizeActorKey,
requestDefaultExtensionPermissions,
} from "./nostr.js";
} from "./nostr/watchHistory.js";
import {
WATCH_HISTORY_CACHE_TTL_MS,
WATCH_HISTORY_MAX_ITEMS,
+4 -5
View File
@@ -17,11 +17,10 @@ const {
getWatchHistoryV2Enabled,
setWatchHistoryV2Enabled,
} = await import("../js/constants.js");
const {
nostrClient,
chunkWatchHistoryPayloadItems,
normalizeActorKey,
} = await import("../js/nostr.js");
const { nostrClient } = await import("../js/nostr.js");
const { chunkWatchHistoryPayloadItems, normalizeActorKey } = await import(
"../js/nostr/watchHistory.js"
);
const { watchHistoryService } = await import("../js/watchHistoryService.js");
const { buildHistoryCard } = await import("../js/historyView.js");
const { getApplication, setApplication } = await import(