mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
remove unnecessary getUser
This commit is contained in:
+11
-29
@@ -874,7 +874,8 @@ export const useUserStore = defineStore('User', () => {
|
||||
})
|
||||
.then((args) => {
|
||||
if (args.ref.id === D.id) {
|
||||
requestAnimationFrame(() => {
|
||||
D.loading = false;
|
||||
|
||||
D.ref = args.ref;
|
||||
uiStore.setDialogCrumbLabel(
|
||||
'user',
|
||||
@@ -906,22 +907,16 @@ export const useUserStore = defineStore('User', () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
D.isFavorite =
|
||||
favoriteStore.getCachedFavoritesByObjectId(D.id);
|
||||
D.isFavorite = favoriteStore.getCachedFavoritesByObjectId(
|
||||
D.id
|
||||
);
|
||||
if (D.ref.friendRequestStatus === 'incoming') {
|
||||
D.incomingRequest = true;
|
||||
} else if (D.ref.friendRequestStatus === 'outgoing') {
|
||||
D.outgoingRequest = true;
|
||||
}
|
||||
userRequest.getUser(args.params).then((args1) => {
|
||||
if (args1.ref.id === D.id) {
|
||||
D.loading = false;
|
||||
}
|
||||
});
|
||||
let inCurrentWorld = false;
|
||||
if (
|
||||
locationStore.lastLocation.playerList.has(D.ref.id)
|
||||
) {
|
||||
if (locationStore.lastLocation.playerList.has(D.ref.id)) {
|
||||
inCurrentWorld = true;
|
||||
}
|
||||
if (userId !== currentUser.value.id) {
|
||||
@@ -938,29 +933,21 @@ export const useUserStore = defineStore('User', () => {
|
||||
const userNotifications =
|
||||
await database.getFriendLogHistoryForUserId(
|
||||
D.id,
|
||||
[
|
||||
'DisplayName',
|
||||
'Friend',
|
||||
'Unfriend'
|
||||
]
|
||||
['DisplayName', 'Friend', 'Unfriend']
|
||||
);
|
||||
const dateFriendedInfo = [];
|
||||
for (const notification of userNotifications) {
|
||||
if (notification.userId !== D.id) {
|
||||
continue;
|
||||
}
|
||||
if (
|
||||
notification.type === 'DisplayName'
|
||||
) {
|
||||
if (notification.type === 'DisplayName') {
|
||||
displayNameMap.set(
|
||||
notification.previousDisplayName,
|
||||
notification.created_at
|
||||
);
|
||||
}
|
||||
if (!D.dateFriended) {
|
||||
if (
|
||||
notification.type === 'Unfriend'
|
||||
) {
|
||||
if (notification.type === 'Unfriend') {
|
||||
D.unFriended = true;
|
||||
if (
|
||||
!appearanceSettingsStore.hideUnfriends
|
||||
@@ -969,9 +956,7 @@ export const useUserStore = defineStore('User', () => {
|
||||
notification.created_at;
|
||||
}
|
||||
}
|
||||
if (
|
||||
notification.type === 'Friend'
|
||||
) {
|
||||
if (notification.type === 'Friend') {
|
||||
D.unFriended = false;
|
||||
D.dateFriended =
|
||||
notification.created_at;
|
||||
@@ -982,9 +967,7 @@ export const useUserStore = defineStore('User', () => {
|
||||
(notification.type === 'Unfriend' &&
|
||||
!appearanceSettingsStore.hideUnfriends)
|
||||
) {
|
||||
dateFriendedInfo.unshift(
|
||||
notification
|
||||
);
|
||||
dateFriendedInfo.unshift(notification);
|
||||
}
|
||||
}
|
||||
D.dateFriendedInfo = dateFriendedInfo;
|
||||
@@ -1044,7 +1027,6 @@ export const useUserStore = defineStore('User', () => {
|
||||
});
|
||||
D.visible = true;
|
||||
applyUserDialogLocation(true);
|
||||
});
|
||||
}
|
||||
});
|
||||
showUserDialogHistory.delete(userId);
|
||||
|
||||
Reference in New Issue
Block a user