mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
Revert "Sidebar all favorites toggle" - causes UI crash
This reverts commit e848f2549fd1ec0d1c125893cc796f3a7d7b06a7.
This commit is contained in:
@@ -9049,12 +9049,10 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
var ref = API.cachedUsers.get(id);
|
var ref = API.cachedUsers.get(id);
|
||||||
var isVIP = this.localFavoriteFriends.has(id);
|
var isVIP = this.localFavoriteFriends.has(id);
|
||||||
var isFavorite = API.cachedFavoritesByObjectId.has(id);
|
|
||||||
var ctx = {
|
var ctx = {
|
||||||
id,
|
id,
|
||||||
state: state || 'offline',
|
state: state || 'offline',
|
||||||
isVIP,
|
isVIP,
|
||||||
isFavorite,
|
|
||||||
ref,
|
ref,
|
||||||
name: '',
|
name: '',
|
||||||
no: ++this.friendsNo,
|
no: ++this.friendsNo,
|
||||||
@@ -9084,7 +9082,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
this.friends.set(id, ctx);
|
this.friends.set(id, ctx);
|
||||||
if (ctx.state === 'online') {
|
if (ctx.state === 'online') {
|
||||||
if ((this.sidebarAllFavorites && ctx.isFavorite) || ctx.isVIP) {
|
if (ctx.isVIP) {
|
||||||
this.friendsGroup0_.push(ctx);
|
this.friendsGroup0_.push(ctx);
|
||||||
this.friendsGroupA_.unshift(ctx);
|
this.friendsGroupA_.unshift(ctx);
|
||||||
this.sortFriendsGroup0 = true;
|
this.sortFriendsGroup0 = true;
|
||||||
@@ -9111,7 +9109,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
this.friends.delete(id);
|
this.friends.delete(id);
|
||||||
if (ctx.state === 'online') {
|
if (ctx.state === 'online') {
|
||||||
if ((this.sidebarAllFavorites && ctx.isFavorite) || ctx.isVIP) {
|
if (ctx.isVIP) {
|
||||||
removeFromArray(this.friendsGroup0_, ctx);
|
removeFromArray(this.friendsGroup0_, ctx);
|
||||||
removeFromArray(this.friendsGroupA_, ctx);
|
removeFromArray(this.friendsGroupA_, ctx);
|
||||||
} else {
|
} else {
|
||||||
@@ -9182,7 +9180,6 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
var ref = API.cachedUsers.get(id);
|
var ref = API.cachedUsers.get(id);
|
||||||
var isVIP = this.localFavoriteFriends.has(id);
|
var isVIP = this.localFavoriteFriends.has(id);
|
||||||
var isFavorite = API.cachedFavoritesByObjectId.has(id);
|
|
||||||
var location = '';
|
var location = '';
|
||||||
var $location_at = '';
|
var $location_at = '';
|
||||||
if (typeof ref !== 'undefined') {
|
if (typeof ref !== 'undefined') {
|
||||||
@@ -9201,10 +9198,7 @@ speechSynthesis.getVoices();
|
|||||||
userId: id
|
userId: id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (
|
if (ctx.isVIP) {
|
||||||
(this.sidebarAllFavorites && ctx.isFavorite) ||
|
|
||||||
ctx.isVIP
|
|
||||||
) {
|
|
||||||
removeFromArray(this.friendsGroupA_, ctx);
|
removeFromArray(this.friendsGroupA_, ctx);
|
||||||
this.friendsGroupA_.unshift(ctx);
|
this.friendsGroupA_.unshift(ctx);
|
||||||
this.sortFriendsGroup0 = true;
|
this.sortFriendsGroup0 = true;
|
||||||
@@ -9221,14 +9215,10 @@ speechSynthesis.getVoices();
|
|||||||
this.friendsGroupD_.push(ctx);
|
this.friendsGroupD_.push(ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ctx.isVIP !== isVIP || ctx.isFavorite !== isFavorite) {
|
if (ctx.isVIP !== isVIP) {
|
||||||
ctx.isVIP = isVIP;
|
ctx.isVIP = isVIP;
|
||||||
ctx.isFavorite = isFavorite;
|
|
||||||
if (ctx.state === 'online') {
|
if (ctx.state === 'online') {
|
||||||
if (
|
if (ctx.isVIP) {
|
||||||
(this.sidebarAllFavorites && ctx.isFavorite) ||
|
|
||||||
ctx.isVIP
|
|
||||||
) {
|
|
||||||
removeFromArray(this.friendsGroup1_, ctx);
|
removeFromArray(this.friendsGroup1_, ctx);
|
||||||
removeFromArray(this.friendsGroupB_, ctx);
|
removeFromArray(this.friendsGroupB_, ctx);
|
||||||
this.friendsGroup0_.push(ctx);
|
this.friendsGroup0_.push(ctx);
|
||||||
@@ -9246,10 +9236,7 @@ speechSynthesis.getVoices();
|
|||||||
if (typeof ref !== 'undefined' && ctx.name !== ref.displayName) {
|
if (typeof ref !== 'undefined' && ctx.name !== ref.displayName) {
|
||||||
ctx.name = ref.displayName;
|
ctx.name = ref.displayName;
|
||||||
if (ctx.state === 'online') {
|
if (ctx.state === 'online') {
|
||||||
if (
|
if (ctx.isVIP) {
|
||||||
(this.sidebarAllFavorites && ctx.isFavorite) ||
|
|
||||||
ctx.isVIP
|
|
||||||
) {
|
|
||||||
this.sortFriendsGroup0 = true;
|
this.sortFriendsGroup0 = true;
|
||||||
} else {
|
} else {
|
||||||
this.sortFriendsGroup1 = true;
|
this.sortFriendsGroup1 = true;
|
||||||
@@ -9277,7 +9264,6 @@ speechSynthesis.getVoices();
|
|||||||
) {
|
) {
|
||||||
ctx.ref = ref;
|
ctx.ref = ref;
|
||||||
ctx.isVIP = isVIP;
|
ctx.isVIP = isVIP;
|
||||||
ctx.isFavorite = isFavorite;
|
|
||||||
if (typeof ref !== 'undefined') {
|
if (typeof ref !== 'undefined') {
|
||||||
ctx.name = ref.displayName;
|
ctx.name = ref.displayName;
|
||||||
}
|
}
|
||||||
@@ -9312,7 +9298,6 @@ speechSynthesis.getVoices();
|
|||||||
} else {
|
} else {
|
||||||
ctx.ref = ref;
|
ctx.ref = ref;
|
||||||
ctx.isVIP = isVIP;
|
ctx.isVIP = isVIP;
|
||||||
ctx.isFavorite = isFavorite;
|
|
||||||
if (typeof ref !== 'undefined') {
|
if (typeof ref !== 'undefined') {
|
||||||
ctx.name = ref.displayName;
|
ctx.name = ref.displayName;
|
||||||
}
|
}
|
||||||
@@ -9334,8 +9319,6 @@ speechSynthesis.getVoices();
|
|||||||
$location_at
|
$location_at
|
||||||
) {
|
) {
|
||||||
var date = this.APILastOnline.get(id);
|
var date = this.APILastOnline.get(id);
|
||||||
var isVIP = this.localFavoriteFriends.has(id);
|
|
||||||
var isFavorite = API.cachedFavoritesByObjectId.has(id);
|
|
||||||
if (
|
if (
|
||||||
ctx.state === 'online' &&
|
ctx.state === 'online' &&
|
||||||
(stateInput === 'active' || stateInput === 'offline') &&
|
(stateInput === 'active' || stateInput === 'offline') &&
|
||||||
@@ -9353,6 +9336,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
var isVIP = this.localFavoriteFriends.has(id);
|
||||||
var newState = stateInput;
|
var newState = stateInput;
|
||||||
var args = await API.getUser({
|
var args = await API.getUser({
|
||||||
userId: id
|
userId: id
|
||||||
@@ -9417,7 +9401,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ctx.state === 'online') {
|
if (ctx.state === 'online') {
|
||||||
if ((this.sidebarAllFavorites && ctx.isFavorite) || ctx.isVIP) {
|
if (ctx.isVIP) {
|
||||||
removeFromArray(this.friendsGroup0_, ctx);
|
removeFromArray(this.friendsGroup0_, ctx);
|
||||||
removeFromArray(this.friendsGroupA_, ctx);
|
removeFromArray(this.friendsGroupA_, ctx);
|
||||||
} else {
|
} else {
|
||||||
@@ -9432,7 +9416,7 @@ speechSynthesis.getVoices();
|
|||||||
removeFromArray(this.friendsGroupD_, ctx);
|
removeFromArray(this.friendsGroupD_, ctx);
|
||||||
}
|
}
|
||||||
if (newState === 'online') {
|
if (newState === 'online') {
|
||||||
if ((this.sidebarAllFavorites && isFavorite) || isVIP) {
|
if (isVIP) {
|
||||||
this.friendsGroup0_.push(ctx);
|
this.friendsGroup0_.push(ctx);
|
||||||
this.friendsGroupA_.unshift(ctx);
|
this.friendsGroupA_.unshift(ctx);
|
||||||
this.sortFriendsGroup0 = true;
|
this.sortFriendsGroup0 = true;
|
||||||
@@ -9456,7 +9440,6 @@ speechSynthesis.getVoices();
|
|||||||
ctx.state = newState;
|
ctx.state = newState;
|
||||||
ctx.name = newRef.displayName;
|
ctx.name = newRef.displayName;
|
||||||
ctx.isVIP = isVIP;
|
ctx.isVIP = isVIP;
|
||||||
ctx.isFavorite = isFavorite;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.getWorldName = async function (location) {
|
$app.methods.getWorldName = async function (location) {
|
||||||
@@ -9507,7 +9490,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
var ctx = this.friends.get(userId);
|
var ctx = this.friends.get(userId);
|
||||||
if (typeof ctx.ref !== 'undefined' && ctx.state === 'online') {
|
if (typeof ctx.ref !== 'undefined' && ctx.state === 'online') {
|
||||||
if ((this.sidebarAllFavorites && ctx.isFavorite) || ctx.isVIP) {
|
if (ctx.isVIP) {
|
||||||
removeFromArray(this.friendsGroupA_, ctx);
|
removeFromArray(this.friendsGroupA_, ctx);
|
||||||
this.friendsGroupA_.unshift(ctx);
|
this.friendsGroupA_.unshift(ctx);
|
||||||
this.sortFriendsGroup1 = true;
|
this.sortFriendsGroup1 = true;
|
||||||
@@ -28134,11 +28117,6 @@ speechSynthesis.getVoices();
|
|||||||
// #endregion
|
// #endregion
|
||||||
// #region | Local Favorite Friends
|
// #region | Local Favorite Friends
|
||||||
|
|
||||||
$app.data.sidebarAllFavorites = await configRepository.getBool(
|
|
||||||
'VRCX_sidebarAllFavorites',
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
$app.data.localFavoriteFriends = new Set();
|
$app.data.localFavoriteFriends = new Set();
|
||||||
$app.data.localFavoriteFriendsGroups = JSON.parse(
|
$app.data.localFavoriteFriendsGroups = JSON.parse(
|
||||||
await configRepository.getString(
|
await configRepository.getString(
|
||||||
@@ -28165,36 +28143,27 @@ speechSynthesis.getVoices();
|
|||||||
'VRCX_localFavoriteFriendsGroups',
|
'VRCX_localFavoriteFriendsGroups',
|
||||||
JSON.stringify(this.localFavoriteFriendsGroups)
|
JSON.stringify(this.localFavoriteFriendsGroups)
|
||||||
);
|
);
|
||||||
configRepository.setBool(
|
|
||||||
'VRCX_sidebarAllFavorites',
|
|
||||||
this.sidebarAllFavorites
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.updateSidebarFriendsList = function () {
|
$app.methods.updateSidebarFriendsList = function () {
|
||||||
for (var ctx of this.friends.values()) {
|
for (var ctx of this.friends.values()) {
|
||||||
var isVIP = this.localFavoriteFriends.has(ctx.id);
|
var isVIP = this.localFavoriteFriends.has(ctx.id);
|
||||||
var isFavorite = API.cachedFavoritesByObjectId.has(ctx.id);
|
if (ctx.isVIP === isVIP) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
ctx.isVIP = isVIP;
|
ctx.isVIP = isVIP;
|
||||||
ctx.isFavorite = isFavorite;
|
|
||||||
if (ctx.state !== 'online') {
|
if (ctx.state !== 'online') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((this.sidebarAllFavorites && ctx.isFavorite) || ctx.isVIP) {
|
if (ctx.isVIP) {
|
||||||
removeFromArray(this.friendsGroup1_, ctx);
|
removeFromArray(this.friendsGroup1_, ctx);
|
||||||
removeFromArray(this.friendsGroupB_, ctx);
|
removeFromArray(this.friendsGroupB_, ctx);
|
||||||
if (this.friendsGroup0_.includes(ctx)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
this.friendsGroup0_.push(ctx);
|
this.friendsGroup0_.push(ctx);
|
||||||
this.friendsGroupA_.unshift(ctx);
|
this.friendsGroupA_.unshift(ctx);
|
||||||
this.sortFriendsGroup0 = true;
|
this.sortFriendsGroup0 = true;
|
||||||
} else {
|
} else {
|
||||||
removeFromArray(this.friendsGroup0_, ctx);
|
removeFromArray(this.friendsGroup0_, ctx);
|
||||||
removeFromArray(this.friendsGroupA_, ctx);
|
removeFromArray(this.friendsGroupA_, ctx);
|
||||||
if (this.friendsGroup1_.includes(ctx)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
this.friendsGroup1_.push(ctx);
|
this.friendsGroup1_.push(ctx);
|
||||||
this.friendsGroupB_.unshift(ctx);
|
this.friendsGroupB_.unshift(ctx);
|
||||||
this.sortFriendsGroup1 = true;
|
this.sortFriendsGroup1 = true;
|
||||||
|
|||||||
@@ -282,9 +282,6 @@
|
|||||||
},
|
},
|
||||||
"side_panel": {
|
"side_panel": {
|
||||||
"header": "Side Panel",
|
"header": "Side Panel",
|
||||||
"favorites": "Favorites",
|
|
||||||
"vrcx": "VRCX",
|
|
||||||
"all": "All",
|
|
||||||
"sorting": {
|
"sorting": {
|
||||||
"header": "Sorting",
|
"header": "Sorting",
|
||||||
"sort_private_to_bottom": "Sort Private to bottom",
|
"sort_private_to_bottom": "Sort Private to bottom",
|
||||||
|
|||||||
@@ -191,10 +191,6 @@ mixin settingsTab()
|
|||||||
div.options-container
|
div.options-container
|
||||||
span.header {{ $t('view.settings.appearance.side_panel.header') }}
|
span.header {{ $t('view.settings.appearance.side_panel.header') }}
|
||||||
br
|
br
|
||||||
div.options-container-item
|
|
||||||
span.name {{ $t('view.settings.appearance.side_panel.favorites') }}
|
|
||||||
el-switch(v-model="sidebarAllFavorites" :inactive-text="$t('view.settings.appearance.side_panel.vrcx')" :active-text="$t('view.settings.appearance.side_panel.all')" @change="updateLocalFavoriteFriends")
|
|
||||||
br
|
|
||||||
span.sub-header {{ $t('view.settings.appearance.side_panel.sorting.header') }}
|
span.sub-header {{ $t('view.settings.appearance.side_panel.sorting.header') }}
|
||||||
div.options-container-item
|
div.options-container-item
|
||||||
span.name {{ $t('view.settings.appearance.side_panel.sorting.sort_private_to_bottom') }}
|
span.name {{ $t('view.settings.appearance.side_panel.sorting.sort_private_to_bottom') }}
|
||||||
|
|||||||
Reference in New Issue
Block a user