mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-02 04:56:06 +02:00
Small changes
This commit is contained in:
@@ -219,7 +219,7 @@ export const useGalleryStore = defineStore('Gallery', () => {
|
||||
return;
|
||||
}
|
||||
instanceStickersCache.value.push(inventoryId);
|
||||
if (instanceStickersCache.value.size > 100) {
|
||||
if (instanceStickersCache.value.length > 100) {
|
||||
instanceStickersCache.value.shift();
|
||||
}
|
||||
const args = await inventoryRequest.getUserInventoryItem({
|
||||
@@ -261,7 +261,10 @@ export const useGalleryStore = defineStore('Gallery', () => {
|
||||
try {
|
||||
const args = await vrcPlusImageRequest.getPrints(params);
|
||||
args.json.sort((a, b) => {
|
||||
return new Date(b.timestamp) - new Date(a.timestamp);
|
||||
return (
|
||||
new Date(b.timestamp).getTime() -
|
||||
new Date(a.timestamp).getTime()
|
||||
);
|
||||
});
|
||||
printTable.value = args.json;
|
||||
} catch (error) {
|
||||
|
||||
@@ -73,7 +73,11 @@ export const useUpdateLoopStore = defineStore('UpdateLoop', () => {
|
||||
state.nextFriendsRefresh = 3600; // 1hour
|
||||
friendStore.refreshFriendsList();
|
||||
authStore.updateStoredUser(userStore.currentUser);
|
||||
if (gameStore.isGameRunning) {
|
||||
if (
|
||||
userStore.currentUser.last_activity &&
|
||||
new Date(userStore.currentUser.last_activity) >
|
||||
new Date(Date.now() - 3600 * 1000) // 1hour
|
||||
) {
|
||||
moderationStore.refreshPlayerModerations();
|
||||
}
|
||||
}
|
||||
|
||||
+5
-2
@@ -15,6 +15,7 @@ import { useAvatarProviderStore } from './avatarProvider';
|
||||
import { useAvatarStore } from './avatar';
|
||||
import { useFavoriteStore } from './favorite';
|
||||
import { useFriendStore } from './friend';
|
||||
import { useGalleryStore } from './gallery';
|
||||
import { useGameLogStore } from './gameLog';
|
||||
import { useGameStore } from './game';
|
||||
import { useGroupStore } from './group';
|
||||
@@ -50,6 +51,7 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
||||
const gameLogStore = useGameLogStore();
|
||||
const updateLoopStore = useUpdateLoopStore();
|
||||
const vrcStatusStore = useVrcStatusStore();
|
||||
const galleryStore = useGalleryStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
const state = reactive({
|
||||
@@ -257,8 +259,9 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
||||
instanceStore.cachedInstances.delete(id);
|
||||
}
|
||||
});
|
||||
avatarStore.cachedAvatarNames = new Map();
|
||||
userStore.customUserTags = new Map();
|
||||
avatarStore.cachedAvatarNames.clear();
|
||||
userStore.customUserTags.clear();
|
||||
galleryStore.cachedEmoji.clear();
|
||||
}
|
||||
|
||||
function eventVrcxMessage(data) {
|
||||
|
||||
Reference in New Issue
Block a user