Skip to content

Commit

Permalink
Fix loading custom.css from custom path
Browse files Browse the repository at this point in the history
  • Loading branch information
Natsumi-sama committed Jan 18, 2025
1 parent ff5e231 commit 9b2ecd3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Dotnet/AppApi/Cef/AppApiVr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ public string CurrentCulture()
public string CustomVrScriptPath()
{
var output = string.Empty;
var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "VRCX",
"customvr.js");
var filePath = Path.Combine(Program.AppDataDirectory, "customvr.js");
if (File.Exists(filePath))
output = filePath;
return output;
Expand Down
6 changes: 2 additions & 4 deletions Dotnet/AppApi/Common/AppApiCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ public void SendIpc(string type, string data)
public string CustomCssPath()
{
var output = string.Empty;
var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "VRCX",
"custom.css");
var filePath = Path.Combine(Program.AppDataDirectory, "custom.css");
if (File.Exists(filePath))
output = filePath;
return output;
Expand All @@ -93,8 +92,7 @@ public string CustomCssPath()
public string CustomScriptPath()
{
var output = string.Empty;
var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "VRCX",
"custom.js");
var filePath = Path.Combine(Program.AppDataDirectory, "custom.js");
if (File.Exists(filePath))
output = filePath;
return output;
Expand Down
9 changes: 8 additions & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5459,6 +5459,10 @@ console.log(`isLinux: ${LINUX}`);
$app.data.dontLogMeOut = false;

API.$on('LOGIN', async function (args) {
// early loading indicator
this.isRefreshFriendsLoading = true;
$app.feedTable.loading = true;

$app.friendLog = new Map();
$app.feedTable.data = [];
$app.feedSessionTable = [];
Expand Down Expand Up @@ -22254,7 +22258,10 @@ console.log(`isLinux: ${LINUX}`);
try {
var loggingEnabled =
await this.getVRChatRegistryKey('LOGGING_ENABLED');
if (loggingEnabled === null) {
if (
loggingEnabled === null ||
typeof loggingEnabled === 'undefined'
) {
// key not found
return;
}
Expand Down

0 comments on commit 9b2ecd3

Please sign in to comment.