Hide group member only instances from Discord presence

This commit is contained in:
Natsumi
2024-09-19 15:45:04 +12:00
parent 6fc5d9e9ab
commit 252e2c4e17
3 changed files with 14 additions and 15 deletions

View File

@@ -110,9 +110,9 @@ namespace VRCX
#pragma warning disable SYSLIB0014 // Type or member is obsolete
client = new WebClient();
#pragma warning restore SYSLIB0014 // Type or member is obsolete
client.Headers.Add("user-agent", Program.Version);
if (WebApi.ProxySet)
client.Proxy = WebApi.Proxy;
client.Headers.Add("user-agent", Program.Version);
DownloadProgress = 0;
DownloadSize = size;
DownloadCanceled = false;

View File

@@ -81,19 +81,15 @@ namespace VRCX
private static string DownloadFile(string fileUrl)
{
HttpClientHandler handler = new HttpClientHandler();
if(WebApi.ProxySet)
{
handler.Proxy = WebApi.Proxy;
handler.UseProxy = true;
}
HttpClient client = new HttpClient(handler);
var httpClientHandler = new HttpClientHandler();
if (WebApi.ProxySet)
httpClientHandler.Proxy = WebApi.Proxy;
var httpClient = new HttpClient(httpClientHandler);
try
{
HttpResponseMessage response = client.GetAsync(fileUrl).Result;
HttpResponseMessage response = httpClient.GetAsync(fileUrl).Result;
if (response.IsSuccessStatusCode)
{
@@ -122,7 +118,7 @@ namespace VRCX
}
finally
{
client.Dispose();
httpClient.Dispose();
}
}

View File

@@ -5235,7 +5235,9 @@ speechSynthesis.getVoices();
case 'instance-queue-left':
console.log('instance-queue-left', content);
$app.instanceQueueClear();
var instanceId = content.instanceLocation;
$app.removeQueuedInstance(instanceId);
// $app.instanceQueueClear();
break;
case 'content-refresh':
@@ -13732,10 +13734,11 @@ speechSynthesis.getVoices();
this.lastLocation$ = L;
}
var hidePrivate = false;
// (L.accessType === 'group' && !L.groupAccessType) || L.groupAccessType === 'member')
if (
this.discordHideInvite &&
(L.accessType === 'invite' || L.accessType === 'invite+')
(L.accessType === 'invite' ||
L.accessType === 'invite+' ||
L.groupAccessType === 'members')
) {
hidePrivate = true;
}