This commit is contained in:
Natsumi
2024-10-28 14:48:29 +13:00
parent 9496d2fe38
commit c4d958b8ba
2 changed files with 17 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ using System.IO.Pipes;
using System.Linq;
using System.Management;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace VRCX
@@ -50,6 +51,7 @@ namespace VRCX
if (!disableClosing && IsDuplicateProcessRunning(LaunchArguments))
{
IPCToMain();
Thread.Sleep(10);
Environment.Exit(0);
}
}
@@ -97,13 +99,13 @@ namespace VRCX
private static bool IsDuplicateProcessRunning(VrcxLaunchArguments launchArguments)
{
var processes = Process.GetProcessesByName("VRCX")
.Where(x => x.Id != Environment.ProcessId);
var processes = Process.GetProcessesByName("VRCX");
foreach (var process in processes)
{
if (process.Id == Environment.ProcessId)
continue;
var commandLine = string.Empty;
try
{
using var searcher = new ManagementObjectSearcher("SELECT CommandLine FROM Win32_Process WHERE ProcessId = " + process.Id);

View File

@@ -2983,6 +2983,10 @@ speechSynthesis.getVoices();
break retryLoop;
} catch (err) {
console.error(err);
if (!API.currentUser.isLoggedIn) {
console.error(`User isn't logged in`);
break mainLoop;
}
if (err?.message?.includes('Not Found')) {
console.error('Awful workaround for awful VRC API bug');
break retryLoop;
@@ -25534,6 +25538,10 @@ speechSynthesis.getVoices();
remainingGroups: []
};
var args = await API.getGroups({ userId });
if (userId !== this.userDialog.id) {
this.userDialog.isGroupsLoading = false;
return;
}
if (userId === API.currentUser.id) {
// update current user groups
API.currentUserGroups.clear();
@@ -33125,8 +33133,10 @@ speechSynthesis.getVoices();
D.selectedAuditLogTypes = [];
API.getCachedGroup({ groupId }).then((args) => {
D.groupRef = args.ref;
if (this.hasGroupPermission(D.groupRef, 'group-audit-view')) {
API.getGroupAuditLogTypes({ groupId });
}
});
API.getGroupAuditLogTypes({ groupId });
this.groupMemberModerationTableForceUpdate = 0;
D.visible = true;
this.setGroupMemberModerationTable(this.groupDialog.members);