mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-04 13:56:07 +02:00
use action from store instead of directly modifying state in components
This commit is contained in:
+11
-3
@@ -230,7 +230,7 @@ export const useFriendStore = defineStore('Friend', () => {
|
||||
state.friendNumber = 0;
|
||||
friendLog.clear();
|
||||
friendLogTable.value.data = [];
|
||||
groupStore.groupInstances = [];
|
||||
groupStore.clearGroupInstances();
|
||||
onlineFriendCount.value = 0;
|
||||
pendingOfflineMap.clear();
|
||||
if (isLoggedIn) {
|
||||
@@ -273,7 +273,7 @@ export const useFriendStore = defineStore('Friend', () => {
|
||||
|
||||
if (appearanceSettingsStore.randomUserColours) {
|
||||
getNameColour(userStore.currentUser.id).then((colour) => {
|
||||
userStore.currentUser.$userColour = colour;
|
||||
userStore.setCurrentUserColour(colour);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1684,6 +1684,13 @@ export const useFriendStore = defineStore('Friend', () => {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {boolean} value
|
||||
*/
|
||||
function setRefreshFriendsLoading(value) {
|
||||
isRefreshFriendsLoading.value = value;
|
||||
}
|
||||
|
||||
return {
|
||||
state,
|
||||
|
||||
@@ -1725,6 +1732,7 @@ export const useFriendStore = defineStore('Friend', () => {
|
||||
updateUserCurrentStatus,
|
||||
handleFriendAdd,
|
||||
handleFriendDelete,
|
||||
initFriendLogHistoryTable
|
||||
initFriendLogHistoryTable,
|
||||
setRefreshFriendsLoading
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user