mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 14:23:51 +02:00
Remove favorite when unfriending
This commit is contained in:
@@ -62,7 +62,7 @@ const favoriteReq = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
useFavoriteStore().handleFavoriteDelete(args);
|
||||
useFavoriteStore().handleFavoriteDelete(params.objectId);
|
||||
return args;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -307,12 +307,11 @@ export const useFavoriteStore = defineStore('Favorite', () => {
|
||||
}
|
||||
}
|
||||
|
||||
function handleFavoriteDelete(args) {
|
||||
const ref = getCachedFavoritesByObjectId(args.params.objectId);
|
||||
function handleFavoriteDelete(objectId) {
|
||||
const ref = getCachedFavoritesByObjectId(objectId);
|
||||
if (typeof ref === 'undefined') {
|
||||
return;
|
||||
}
|
||||
args.ref = ref;
|
||||
handleFavoriteAtDelete(ref);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ export const useFriendStore = defineStore('Friend', () => {
|
||||
const updateLoopStore = useUpdateLoopStore();
|
||||
const authStore = useAuthStore();
|
||||
const locationStore = useLocationStore();
|
||||
const favoriteStore = useFavoriteStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
const state = reactive({
|
||||
@@ -1049,6 +1050,7 @@ export const useFriendStore = defineStore('Friend', () => {
|
||||
notificationStore.queueFriendLogNoty(friendLogHistory);
|
||||
friendLog.delete(id);
|
||||
database.deleteFriendLogCurrent(id);
|
||||
favoriteStore.handleFavoriteDelete(id);
|
||||
if (!appearanceSettingsStore.hideUnfriends) {
|
||||
uiStore.notifyMenu('friend-log');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user