mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Fixes
This commit is contained in:
@@ -12,6 +12,7 @@ using System.IO.Pipes;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Management;
|
using System.Management;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace VRCX
|
namespace VRCX
|
||||||
@@ -50,6 +51,7 @@ namespace VRCX
|
|||||||
if (!disableClosing && IsDuplicateProcessRunning(LaunchArguments))
|
if (!disableClosing && IsDuplicateProcessRunning(LaunchArguments))
|
||||||
{
|
{
|
||||||
IPCToMain();
|
IPCToMain();
|
||||||
|
Thread.Sleep(10);
|
||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,13 +99,13 @@ namespace VRCX
|
|||||||
|
|
||||||
private static bool IsDuplicateProcessRunning(VrcxLaunchArguments launchArguments)
|
private static bool IsDuplicateProcessRunning(VrcxLaunchArguments launchArguments)
|
||||||
{
|
{
|
||||||
var processes = Process.GetProcessesByName("VRCX")
|
var processes = Process.GetProcessesByName("VRCX");
|
||||||
.Where(x => x.Id != Environment.ProcessId);
|
|
||||||
|
|
||||||
foreach (var process in processes)
|
foreach (var process in processes)
|
||||||
{
|
{
|
||||||
|
if (process.Id == Environment.ProcessId)
|
||||||
|
continue;
|
||||||
|
|
||||||
var commandLine = string.Empty;
|
var commandLine = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var searcher = new ManagementObjectSearcher("SELECT CommandLine FROM Win32_Process WHERE ProcessId = " + process.Id);
|
using var searcher = new ManagementObjectSearcher("SELECT CommandLine FROM Win32_Process WHERE ProcessId = " + process.Id);
|
||||||
|
|||||||
@@ -2983,6 +2983,10 @@ speechSynthesis.getVoices();
|
|||||||
break retryLoop;
|
break retryLoop;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
if (!API.currentUser.isLoggedIn) {
|
||||||
|
console.error(`User isn't logged in`);
|
||||||
|
break mainLoop;
|
||||||
|
}
|
||||||
if (err?.message?.includes('Not Found')) {
|
if (err?.message?.includes('Not Found')) {
|
||||||
console.error('Awful workaround for awful VRC API bug');
|
console.error('Awful workaround for awful VRC API bug');
|
||||||
break retryLoop;
|
break retryLoop;
|
||||||
@@ -25534,6 +25538,10 @@ speechSynthesis.getVoices();
|
|||||||
remainingGroups: []
|
remainingGroups: []
|
||||||
};
|
};
|
||||||
var args = await API.getGroups({ userId });
|
var args = await API.getGroups({ userId });
|
||||||
|
if (userId !== this.userDialog.id) {
|
||||||
|
this.userDialog.isGroupsLoading = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (userId === API.currentUser.id) {
|
if (userId === API.currentUser.id) {
|
||||||
// update current user groups
|
// update current user groups
|
||||||
API.currentUserGroups.clear();
|
API.currentUserGroups.clear();
|
||||||
@@ -33125,8 +33133,10 @@ speechSynthesis.getVoices();
|
|||||||
D.selectedAuditLogTypes = [];
|
D.selectedAuditLogTypes = [];
|
||||||
API.getCachedGroup({ groupId }).then((args) => {
|
API.getCachedGroup({ groupId }).then((args) => {
|
||||||
D.groupRef = args.ref;
|
D.groupRef = args.ref;
|
||||||
|
if (this.hasGroupPermission(D.groupRef, 'group-audit-view')) {
|
||||||
|
API.getGroupAuditLogTypes({ groupId });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
API.getGroupAuditLogTypes({ groupId });
|
|
||||||
this.groupMemberModerationTableForceUpdate = 0;
|
this.groupMemberModerationTableForceUpdate = 0;
|
||||||
D.visible = true;
|
D.visible = true;
|
||||||
this.setGroupMemberModerationTable(this.groupDialog.members);
|
this.setGroupMemberModerationTable(this.groupDialog.members);
|
||||||
|
|||||||
Reference in New Issue
Block a user