mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Fix config error from vr.js running before app,js config is initialized
This commit is contained in:
@@ -727,9 +727,13 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
$app.methods.updateVRConfigVars = function () {
|
$app.methods.updateVRConfigVars = function () {
|
||||||
var newConfig = sharedRepository.getObject('VRConfigVars');
|
var newConfig = sharedRepository.getObject('VRConfigVars');
|
||||||
if ((newConfig) && (JSON.stringify(newConfig) !== JSON.stringify(this.config))) {
|
if (newConfig) {
|
||||||
this.config = newConfig;
|
if (JSON.stringify(newConfig) !== JSON.stringify(this.config)) {
|
||||||
this.lastFeedEntry = [];
|
this.config = newConfig;
|
||||||
|
this.lastFeedEntry = [];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw 'config not set';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -770,9 +774,6 @@ speechSynthesis.getVoices();
|
|||||||
$app.methods.updateLoop = async function () {
|
$app.methods.updateLoop = async function () {
|
||||||
try {
|
try {
|
||||||
this.updateVRConfigVars();
|
this.updateVRConfigVars();
|
||||||
if (!this.config) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.currentTime = new Date().toJSON();
|
this.currentTime = new Date().toJSON();
|
||||||
this.currentUserStatus = sharedRepository.getString('current_user_status');
|
this.currentUserStatus = sharedRepository.getString('current_user_status');
|
||||||
this.isGameRunning = sharedRepository.getBool('is_game_running');
|
this.isGameRunning = sharedRepository.getBool('is_game_running');
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ html
|
|||||||
.x-app#x-app(v-if="appType === '1'" class="x-app-type")
|
.x-app#x-app(v-if="appType === '1'" class="x-app-type")
|
||||||
.x-container(style="flex:1")
|
.x-container(style="flex:1")
|
||||||
.x-friend-list(ref="list" style="color:#aaa")
|
.x-friend-list(ref="list" style="color:#aaa")
|
||||||
template(v-if="config.minimalFeed")
|
template(v-if="config && config.minimalFeed")
|
||||||
template(v-for="feed in wristFeed")
|
template(v-for="feed in wristFeed")
|
||||||
.x-friend-item(v-if="feed.type === 'GPS'" :class="{ friend: feed.isFriend, favorite: feed.isFavorite }")
|
.x-friend-item(v-if="feed.type === 'GPS'" :class="{ friend: feed.isFriend, favorite: feed.isFavorite }")
|
||||||
.detail
|
.detail
|
||||||
|
|||||||
Reference in New Issue
Block a user