Skip to content

Commit 4229889

Browse files
committed
[ 1.0.37 ] * Updated favorite browsers to clear cached filter criteria if the filter criteria textbox was cleared.
1 parent c1aa39d commit 4229889

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Change are listed in reverse chronological order (newest to oldest).
66

77
<span class="changelog">
88

9+
###### [ 1.0.37 ] - 2025/02/05
10+
11+
* Updated favorite browsers to clear cached filter criteria if the filter criteria textbox was cleared.
12+
913
###### [ 1.0.36 ] - 2025/02/02
1014

1115
* Updated section filter criteria to include both the name and subtitle value when filtering the list of items. This was applied to the following sections: Albums, Audiobooks, Episodes, UserPresets, and Tracks.

src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { css } from 'lit';
22

33
/** current version of the card. */
4-
export const CARD_VERSION = '1.0.36';
4+
export const CARD_VERSION = '1.0.37';
55

66
/** SpotifyPlus integration domain identifier. */
77
export const DOMAIN_SPOTIFYPLUS = 'spotifyplus';

src/sections/fav-browser-base.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,11 @@ export class FavBrowserBase extends LitElement {
467467
// store search critera.
468468
this.filterCriteria = ev.detail.value;
469469

470+
// if filter cleared, then clear cache as well.
471+
if (ev.detail.value == "") {
472+
storageService.clearStorageValue(this.cacheKeyBase + this.mediaType + CACHE_KEY_FILTER_CRITERIA);
473+
}
474+
470475
}
471476

472477

@@ -495,6 +500,7 @@ export class FavBrowserBase extends LitElement {
495500
// clear cache if user chose to manually refresh the media list.
496501
storageService.clearStorageValue(this.cacheKeyBase + this.mediaType + CACHE_KEY_MEDIA_LIST_LAST_UPDATED);
497502
storageService.clearStorageValue(this.cacheKeyBase + this.mediaType + CACHE_KEY_MEDIA_LIST);
503+
storageService.clearStorageValue(this.cacheKeyBase + this.mediaType + CACHE_KEY_FILTER_CRITERIA);
498504

499505
// clear first time media list load for card editing logic.
500506
if (this.mediaType in Store.hasCardEditLoadedMediaList) {

0 commit comments

Comments
 (0)