fix: remove legacy filter state restoration (#5535)

25fb4ceb501bc61b3f9e4e6349b8bdd3630eca51

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
1 files changed, +0 -27Showing whitespace changes
public/scripts/tags.js+0 -27
@@ -2762,37 +2762,10 @@ function extractCharacterAvatar(avatarSrc) {
27622762
2763function restoreSavedTagFilters() {2763function restoreSavedTagFilters() {
2764 try {2764 try {
2765 const validStates = new Set(Object.keys(FILTER_STATES));
2766 const readState = (/** @type {string} */ storageKey) => {
2767 const v = accountStorage.getItem(storageKey);
2768 return v && validStates.has(v) ? v : null;
2769 };
2770
2771 const favState = readState(ACTIONABLE_FILTER_STORAGE_KEYS.FAV);
2772 const groupState = readState(ACTIONABLE_FILTER_STORAGE_KEYS.GROUP);
2773 const folderState = readState(ACTIONABLE_FILTER_STORAGE_KEYS.FOLDER);
2774
2775 if (favState) {
2776 ACTIONABLE_TAGS.FAV.filter_state = favState;
2777 entitiesFilter.setFilterData(FILTER_TYPES.FAV, favState, true);
2778 }
2779
2780 // Load persisted filter states for all contexts (including character list)2765 // Load persisted filter states for all contexts (including character list)
2781 loadFilterStatesForContext(entitiesFilter, 'CharacterList');2766 loadFilterStatesForContext(entitiesFilter, 'CharacterList');
2782 loadFilterStatesForContext(groupCandidatesFilter, 'GroupCandidates');2767 loadFilterStatesForContext(groupCandidatesFilter, 'GroupCandidates');
2783 loadFilterStatesForContext(groupMembersFilter, 'GroupMembers');2768 loadFilterStatesForContext(groupMembersFilter, 'GroupMembers');
2784 if (groupState) {
2785 ACTIONABLE_TAGS.GROUP.filter_state = groupState;
2786 entitiesFilter.setFilterData(FILTER_TYPES.GROUP, groupState, true);
2787 }
2788 if (folderState) {
2789 ACTIONABLE_TAGS.FOLDER.filter_state = folderState;
2790 entitiesFilter.setFilterData(FILTER_TYPES.FOLDER, folderState, true);
2791 }
2792
2793 // Note: Regular tag filter states are now loaded from storage via loadFilterStatesForContext()
2794 // The old tag.filter_state property is only maintained for backward compatibility with
2795 // the main character list's actionable tags (Favorites, Groups, Folders)
2796 } catch (e) {2769 } catch (e) {
2797 console.warn('Failed to restore actionable filter states from account storage', e);2770 console.warn('Failed to restore actionable filter states from account storage', e);
2798 }2771 }