mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
Fix VIP filter at startup for feed and gameLog
This commit is contained in:
@@ -190,11 +190,11 @@
|
|||||||
"announcement": "Event Announcement"
|
"announcement": "Event Announcement"
|
||||||
},
|
},
|
||||||
"group": {
|
"group": {
|
||||||
"announcement": "Announcement",
|
"announcement": "Group Announcement",
|
||||||
"informative": "Informative",
|
"informative": "Group Informative",
|
||||||
"invite": "Invite",
|
"invite": "Group Invite",
|
||||||
"joinRequest": "Join Request",
|
"joinRequest": "Group Join Request",
|
||||||
"transfer": "Transfer",
|
"transfer": "Group Transfer",
|
||||||
"queueReady": "Queue Ready"
|
"queueReady": "Queue Ready"
|
||||||
},
|
},
|
||||||
"moderation": {
|
"moderation": {
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
const watchState = reactive({
|
const watchState = reactive({
|
||||||
isLoggedIn: false,
|
isLoggedIn: false,
|
||||||
isFriendsLoaded: false
|
isFriendsLoaded: false,
|
||||||
|
isFavoritesLoaded: false
|
||||||
});
|
});
|
||||||
|
|
||||||
export { watchState };
|
export { watchState };
|
||||||
|
|||||||
@@ -186,6 +186,7 @@ export const useAuthStore = defineStore('Auth', () => {
|
|||||||
}
|
}
|
||||||
watchState.isLoggedIn = false;
|
watchState.isLoggedIn = false;
|
||||||
watchState.isFriendsLoaded = false;
|
watchState.isFriendsLoaded = false;
|
||||||
|
watchState.isFavoritesLoaded = false;
|
||||||
notificationStore.notificationInitStatus = false;
|
notificationStore.notificationInitStatus = false;
|
||||||
await updateStoredUser(userStore.currentUser);
|
await updateStoredUser(userStore.currentUser);
|
||||||
webApiService.clearCookies();
|
webApiService.clearCookies();
|
||||||
|
|||||||
@@ -932,6 +932,7 @@ export const useFavoriteStore = defineStore('Favorite', () => {
|
|||||||
refreshFavoriteGroups();
|
refreshFavoriteGroups();
|
||||||
friendStore.updateLocalFavoriteFriends();
|
friendStore.updateLocalFavoriteFriends();
|
||||||
state.isFavoriteLoading = false;
|
state.isFavoriteLoading = false;
|
||||||
|
watchState.isFavoritesLoaded = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,6 +79,15 @@ export const useFeedStore = defineStore('Feed', () => {
|
|||||||
{ flush: 'sync' }
|
{ flush: 'sync' }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => watchState.isFavoritesLoaded,
|
||||||
|
(isFavoritesLoaded) => {
|
||||||
|
if (isFavoritesLoaded && state.feedTable.vip) {
|
||||||
|
feedTableLookup(); // re-apply VIP filter after friends are loaded
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
function feedSearch(row) {
|
function feedSearch(row) {
|
||||||
const value = state.feedTable.search.toUpperCase();
|
const value = state.feedTable.search.toUpperCase();
|
||||||
if (!value) {
|
if (!value) {
|
||||||
|
|||||||
+13
-5
@@ -93,11 +93,10 @@ export const useGameLogStore = defineStore('GameLog', () => {
|
|||||||
state.gameLogTable.filter = JSON.parse(
|
state.gameLogTable.filter = JSON.parse(
|
||||||
await configRepository.getString('VRCX_gameLogTableFilters', '[]')
|
await configRepository.getString('VRCX_gameLogTableFilters', '[]')
|
||||||
);
|
);
|
||||||
// gameLog loads before favorites
|
state.gameLogTable.vip = await configRepository.getBool(
|
||||||
// await configRepository.getBool(
|
'VRCX_gameLogTableVIPFilter',
|
||||||
// 'VRCX_gameLogTableVIPFilter',
|
false
|
||||||
// false
|
);
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
init();
|
init();
|
||||||
@@ -149,6 +148,15 @@ export const useGameLogStore = defineStore('GameLog', () => {
|
|||||||
{ flush: 'sync' }
|
{ flush: 'sync' }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => watchState.isFavoritesLoaded,
|
||||||
|
(isFavoritesLoaded) => {
|
||||||
|
if (isFavoritesLoaded && state.gameLogTable.vip) {
|
||||||
|
gameLogTableLookup(); // re-apply VIP filter after friends are loaded
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => watchState.isFriendsLoaded,
|
() => watchState.isFriendsLoaded,
|
||||||
(isFriendsLoaded) => {
|
(isFriendsLoaded) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user