Small fixes and changes

This commit is contained in:
Natsumi
2024-05-29 10:45:48 +12:00
parent 1810171241
commit fff33bf03f
7 changed files with 52 additions and 86 deletions

View File

@@ -476,7 +476,7 @@ speechSynthesis.getVoices();
status === 401 &&
data.error.message === '"Missing Credentials"'
) {
if (endpoint.substring(0, 9) === 'auth/user') {
if (endpoint === 'auth/user') {
this.$emit('AUTOLOGIN');
}
throw new Error('401: Missing Credentials');
@@ -10006,7 +10006,7 @@ speechSynthesis.getVoices();
this.feedTable.loading = true;
var vipList = [];
if (this.feedTable.vip) {
vipList = this.getUserVipList();
vipList = Array.from(this.localFavoriteFriends.values());
}
this.feedTable.data = await database.lookupFeedDatabase(
this.feedTable.search,
@@ -10016,16 +10016,6 @@ speechSynthesis.getVoices();
this.feedTable.loading = false;
};
$app.methods.getUserVipList = function () {
var vipList = [];
API.cachedFavorites.forEach((favorite) => {
if (favorite.type === 'friend') {
vipList.push(favorite.favoriteId);
}
});
return vipList;
};
API.$on('LOGIN', async function (args) {
$app.friendLog = new Map();
$app.feedTable.data = [];