mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-02 21:16:07 +02:00
Misc fixes
This commit is contained in:
+1
-10
@@ -369,9 +369,6 @@ export const useFriendStore = defineStore('Friend', () => {
|
||||
function updateLocalFavoriteFriends() {
|
||||
const favoriteStore = useFavoriteStore();
|
||||
const { cachedFavorites } = favoriteStore;
|
||||
generalSettingsStore.setLocalFavoriteFriendsGroups(
|
||||
generalSettingsStore.localFavoriteFriendsGroups
|
||||
);
|
||||
state.localFavoriteFriends.clear();
|
||||
for (const ref of cachedFavorites.values()) {
|
||||
if (
|
||||
@@ -1112,13 +1109,7 @@ export const useFriendStore = defineStore('Friend', () => {
|
||||
}
|
||||
const ref = userStore.cachedUsers.get(id);
|
||||
if (typeof ref === 'undefined') {
|
||||
try {
|
||||
userRequest.getUser({
|
||||
userId: id
|
||||
});
|
||||
} catch (err) {
|
||||
console.error('Fetch user on add as friend', err);
|
||||
}
|
||||
// deleted account on friends list
|
||||
return;
|
||||
}
|
||||
friendRequest
|
||||
|
||||
+13
-5
@@ -11,7 +11,7 @@ import { $app } from '../app';
|
||||
import configRepository from '../service/config';
|
||||
import { watchState } from '../service/watchState';
|
||||
import { groupDialogFilterOptions } from '../shared/constants/';
|
||||
import { replaceBioSymbols } from '../shared/utils';
|
||||
import { replaceBioSymbols, convertFileUrlToImageUrl } from '../shared/utils';
|
||||
import { useGameStore } from './game';
|
||||
import { useInstanceStore } from './instance';
|
||||
import { useUserStore } from './user';
|
||||
@@ -685,9 +685,6 @@ export const useGroupStore = defineStore('Group', () => {
|
||||
// keep roleIds
|
||||
json.myMember.roleIds = ref.myMember.roleIds;
|
||||
}
|
||||
if (typeof json.myMember.isRepresenting !== 'undefined') {
|
||||
json.myMember.isRepresenting = ref.myMember.isRepresenting;
|
||||
}
|
||||
Object.assign(ref.myMember, json.myMember);
|
||||
}
|
||||
Object.assign(ref, json);
|
||||
@@ -722,11 +719,23 @@ export const useGroupStore = defineStore('Group', () => {
|
||||
}
|
||||
|
||||
function handleGroupRepresented(args) {
|
||||
const D = userStore.userDialog;
|
||||
const json = args.json;
|
||||
D.representedGroup = json;
|
||||
D.representedGroup.$thumbnailUrl = convertFileUrlToImageUrl(
|
||||
json.iconUrl
|
||||
);
|
||||
if (!json || !json.isRepresenting) {
|
||||
D.isRepresentedGroupLoading = false;
|
||||
}
|
||||
if (!json.groupId) {
|
||||
// no group
|
||||
return;
|
||||
}
|
||||
if (args.params.userId !== userStore.currentUser.id) {
|
||||
// not current user, don't apply someone elses myMember
|
||||
return;
|
||||
}
|
||||
json.$memberId = json.id;
|
||||
json.id = json.groupId;
|
||||
applyGroup(json);
|
||||
@@ -1002,7 +1011,6 @@ export const useGroupStore = defineStore('Group', () => {
|
||||
})
|
||||
.then((args) => {
|
||||
handleGroupRepresented(args);
|
||||
userStore.userDialog.representedGroup = args.json;
|
||||
return args;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6,10 +6,12 @@ import { t } from '../../plugin';
|
||||
import configRepository from '../../service/config';
|
||||
import { useVrcxStore } from '../vrcx';
|
||||
import { useVRCXUpdaterStore } from '../vrcxUpdater';
|
||||
import { useFriendStore } from '../friend';
|
||||
|
||||
export const useGeneralSettingsStore = defineStore('GeneralSettings', () => {
|
||||
const vrcxStore = useVrcxStore();
|
||||
const VRCXUpdaterStore = useVRCXUpdaterStore();
|
||||
const friendStore = useFriendStore();
|
||||
const state = reactive({
|
||||
isStartAtWindowsStartup: false,
|
||||
isStartAsMinimizedState: false,
|
||||
@@ -184,6 +186,7 @@ export const useGeneralSettingsStore = defineStore('GeneralSettings', () => {
|
||||
'VRCX_localFavoriteFriendsGroups',
|
||||
JSON.stringify(value)
|
||||
);
|
||||
friendStore.updateLocalFavoriteFriends();
|
||||
}
|
||||
function setUdonExceptionLogging() {
|
||||
state.udonExceptionLogging = !state.udonExceptionLogging;
|
||||
|
||||
@@ -20,7 +20,6 @@ import {
|
||||
compareByLocationAt,
|
||||
compareByName,
|
||||
compareByUpdatedAt,
|
||||
convertFileUrlToImageUrl,
|
||||
extractFileId,
|
||||
getAllUserMemos,
|
||||
getGroupName,
|
||||
@@ -947,14 +946,6 @@ export const useUserStore = defineStore('User', () => {
|
||||
.getRepresentedGroup({ userId })
|
||||
.then((args1) => {
|
||||
groupStore.handleGroupRepresented(args1);
|
||||
D.representedGroup = args1.json;
|
||||
D.representedGroup.$thumbnailUrl =
|
||||
convertFileUrlToImageUrl(
|
||||
args1.json.iconUrl
|
||||
);
|
||||
if (!args1.json || !args1.json.isRepresenting) {
|
||||
D.isRepresentedGroupLoading = false;
|
||||
}
|
||||
});
|
||||
D.loading = false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user