disable notification on busy (closes #32)

This commit is contained in:
pypy
2020-03-03 20:28:16 +09:00
parent cb19b9ec15
commit b73ce2f699
2 changed files with 6 additions and 0 deletions

View File

@@ -911,6 +911,7 @@ CefSharp.BindObjectAsync(
ref
});
}
VRCXStorage.SetObject('currentUser', ref);
return ref;
};

View File

@@ -653,6 +653,7 @@ CefSharp.BindObjectAsync(
$app.methods.update = function () {
this.currentTime = new Date().toJSON();
this.currentUser = VRCXStorage.GetObject('currentUser') || {};
VRCX.CpuUsage().then((cpuUsage) => {
this.cpuUsage = cpuUsage.toFixed(2);
});
@@ -688,6 +689,10 @@ CefSharp.BindObjectAsync(
}
}
});
// disable notification on busy
if (this.currentUser.status === 'busy') {
return;
}
var notys = [];
this.feeds.forEach((feed) => {
if (feed.isFavorite) {