diff --git a/js/historyView.js b/js/historyView.js index a1d056b6..55dd102c 100644 --- a/js/historyView.js +++ b/js/historyView.js @@ -1404,7 +1404,6 @@ export function createWatchHistoryRenderer(config = {}) { sentinelSelector = "#watchHistorySentinel", loadMoreSelector = "#watchHistoryLoadMore", clearButtonSelector = '[data-history-action="clear-cache"]', - republishButtonSelector = '[data-history-action="republish"]', refreshButtonSelector = '[data-history-action="refresh"]', errorBannerSelector = "#watchHistoryError", scrollContainerSelector = null, @@ -1471,7 +1470,6 @@ export function createWatchHistoryRenderer(config = {}) { sentinel: null, loadMore: null, clearButton: null, - republishButton: null, refreshButton: null, errorBanner: null, scrollContainer: null, @@ -1482,7 +1480,6 @@ export function createWatchHistoryRenderer(config = {}) { let boundGridClickHandler = null; let boundLoadMoreHandler = null; let boundClearHandler = null; - let boundRepublishHandler = null; let boundRefreshHandler = null; const subscriptions = new Set(); @@ -1498,7 +1495,6 @@ export function createWatchHistoryRenderer(config = {}) { sentinel: resolveElement(sentinelSelector, scope), loadMore: resolveElement(loadMoreSelector, scope), clearButton: resolveElement(clearButtonSelector, scope), - republishButton: resolveElement(republishButtonSelector, scope), refreshButton: resolveElement(refreshButtonSelector, scope), errorBanner: resolveElement(errorBannerSelector, scope), scrollContainer: resolveElement(scrollContainerSelector, scope), @@ -2124,42 +2120,6 @@ export function createWatchHistoryRenderer(config = {}) { elements.clearButton.addEventListener("click", boundClearHandler); } - if (elements.republishButton) { - if (boundRepublishHandler) { - elements.republishButton.removeEventListener( - "click", - boundRepublishHandler - ); - } - boundRepublishHandler = async (event) => { - event.preventDefault(); - userLogger.info("[historyView] 'Republish now' clicked."); - const actor = await resolveActorKey(); - try { - const payload = state.items.map((entry) => ({ - ...entry.pointer, - watchedAt: entry.watchedAt, - })); - await snapshot(payload, { actor, reason: "manual-republish" }); - const app = getAppInstance(); - if (typeof app?.showSuccess === "function") { - app.showSuccess("Watch history snapshot queued for publish."); - } else { - console.log("Watch history snapshot queued for publish."); - } - } catch (error) { - const app = getAppInstance(); - if (typeof app?.showError === "function") { - app.showError("Failed to publish watch history. Try again later."); - } else { - console.error("Failed to publish watch history."); - } - userLogger.warn("[historyView] Republish failed:", error); - } - }; - elements.republishButton.addEventListener("click", boundRepublishHandler); - } - if (elements.refreshButton) { if (boundRefreshHandler) { elements.refreshButton.removeEventListener("click", boundRefreshHandler); @@ -2407,13 +2367,6 @@ export function createWatchHistoryRenderer(config = {}) { elements.clearButton.removeEventListener("click", boundClearHandler); boundClearHandler = null; } - if (elements.republishButton && boundRepublishHandler) { - elements.republishButton.removeEventListener( - "click", - boundRepublishHandler - ); - boundRepublishHandler = null; - } if (elements.refreshButton && boundRefreshHandler) { elements.refreshButton.removeEventListener("click", boundRefreshHandler); boundRefreshHandler = null; diff --git a/views/history.html b/views/history.html index 4a3b3516..ef2cd972 100644 --- a/views/history.html +++ b/views/history.html @@ -18,13 +18,6 @@ > Clear local history -