Sort subs locally.

This commit is contained in:
Kavin 2022-08-01 19:20:20 +05:30
parent de4d8ce350
commit 8e07948e28
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -222,6 +222,8 @@ const mixin = {
}, },
importSubscriptionsLocally(newChannels) { importSubscriptionsLocally(newChannels) {
const subscriptions = this.getLocalSubscriptions().concat(newChannels); const subscriptions = this.getLocalSubscriptions().concat(newChannels);
// Sort for better cache hits
subscriptions.sort();
localStorage.setItem("localSubscriptions"), JSON.stringify(subscriptions); localStorage.setItem("localSubscriptions"), JSON.stringify(subscriptions);
}, },
}, },