Skip to content

Commit

Permalink
Function name tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Jul 13, 2023
1 parent 7bc3565 commit 71fcf43
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions static/js/tabpane-persist.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function tdPersistKey(key, value) {
}

// Retrieve, increment, and store tab-select event count, then returns it.
function tdGetTabSelectEventCount() {
function tdGetTabSelectEventCountAndInc() {
// @requires: tdSupportsLocalStorage();

const storedCount = localStorage.getItem(td_persistCounterStorageKeyName);
Expand All @@ -59,10 +59,15 @@ function tdActivateTabsWithKey(key) {
function tdPersistActiveTab(activeTabKey) {
if (!_tdSupportsLocalStorage()) return;

tdPersistKey(_tdStoragePersistKey(activeTabKey), tdGetTabSelectEventCount());
tdPersistKey(
_tdStoragePersistKey(activeTabKey),
tdGetTabSelectEventCountAndInc()
);
tdActivateTabsWithKey(activeTabKey);
}

// Handlers

function tdGetAndActivatePersistedTabs(tabs) {
// Get unique persistence keys of tabs in this page
var keyOfTabsInThisPage = [
Expand Down

0 comments on commit 71fcf43

Please sign in to comment.