diff --git a/webextensions/sidebar/collapse-expand.js b/webextensions/sidebar/collapse-expand.js index 27b37313c..d29563d3d 100644 --- a/webextensions/sidebar/collapse-expand.js +++ b/webextensions/sidebar/collapse-expand.js @@ -49,8 +49,6 @@ function log(...args) { export const onUpdating = new EventListenerManager(); export const onUpdated = new EventListenerManager(); -export const onRefreshStarted = new EventListenerManager(); -export const onRefreshFinished = new EventListenerManager(); export function setCollapsed(tab, info = {}) { log('setCollapsed ', tab.id, info); @@ -78,8 +76,6 @@ export function setCollapsed(tab, info = {}) { if (tab.status == 'loading') tab.$TST.addState(Constants.kTAB_STATE_THROBBER_UNSYNCHRONIZED); - onRefreshStarted.dispatch(tab, { collapsed: info.cpllapsed }); - const manager = tab.$TST.collapsedStateChangedManager || new EventListenerManager(); if (tab.$TST.updatingCollapsedStateCanceller) { @@ -119,7 +115,6 @@ export function setCollapsed(tab, info = {}) { anchor: info.anchor, last: info.last }); - onRefreshFinished.dispatch(tab, { collapsed: info.cpllapsed }); }; manager.addListener(onCompleted); @@ -147,7 +142,6 @@ export function setCollapsed(tab, info = {}) { const onCanceled = () => { manager.removeListener(onCompleted); - onRefreshFinished.dispatch(tab, { collapsed: info.cpllapsed }); }; nextFrame().then(() => { diff --git a/webextensions/sidebar/indent.js b/webextensions/sidebar/indent.js index 40c040dbd..dc385033d 100644 --- a/webextensions/sidebar/indent.js +++ b/webextensions/sidebar/indent.js @@ -242,20 +242,6 @@ CollapseExpand.onUpdated.addListener((_tab, _options) => { reserveToUpdateVisualMaxTreeLevel(); }); -CollapseExpand.onRefreshStarted.addListener((_tab, _options) => { - if (configs.indentAutoShrink && - configs.indentAutoShrinkOnlyForVisible) - startBatchToUpdateMaxTreeLevel(); -}); - -CollapseExpand.onRefreshFinished.addListener((_tab, _options) => { - if (configs.indentAutoShrink && - configs.indentAutoShrinkOnlyForVisible) { - reserveToUpdateVisualMaxTreeLevel(); - finishBatchToUpdateMaxTreeLevel(); - } -}); - const BUFFER_KEY_PREFIX = 'indent-'; BackgroundConnection.onMessage.addListener(async message => {