mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-24 17:23:50 +02:00
Hide group member only instances from Discord presence
This commit is contained in:
@@ -110,9 +110,9 @@ namespace VRCX
|
|||||||
#pragma warning disable SYSLIB0014 // Type or member is obsolete
|
#pragma warning disable SYSLIB0014 // Type or member is obsolete
|
||||||
client = new WebClient();
|
client = new WebClient();
|
||||||
#pragma warning restore SYSLIB0014 // Type or member is obsolete
|
#pragma warning restore SYSLIB0014 // Type or member is obsolete
|
||||||
|
client.Headers.Add("user-agent", Program.Version);
|
||||||
if (WebApi.ProxySet)
|
if (WebApi.ProxySet)
|
||||||
client.Proxy = WebApi.Proxy;
|
client.Proxy = WebApi.Proxy;
|
||||||
client.Headers.Add("user-agent", Program.Version);
|
|
||||||
DownloadProgress = 0;
|
DownloadProgress = 0;
|
||||||
DownloadSize = size;
|
DownloadSize = size;
|
||||||
DownloadCanceled = false;
|
DownloadCanceled = false;
|
||||||
|
|||||||
@@ -81,19 +81,15 @@ namespace VRCX
|
|||||||
|
|
||||||
private static string DownloadFile(string fileUrl)
|
private static string DownloadFile(string fileUrl)
|
||||||
{
|
{
|
||||||
HttpClientHandler handler = new HttpClientHandler();
|
var httpClientHandler = new HttpClientHandler();
|
||||||
|
if (WebApi.ProxySet)
|
||||||
|
httpClientHandler.Proxy = WebApi.Proxy;
|
||||||
|
|
||||||
if(WebApi.ProxySet)
|
var httpClient = new HttpClient(httpClientHandler);
|
||||||
{
|
|
||||||
handler.Proxy = WebApi.Proxy;
|
|
||||||
handler.UseProxy = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
HttpClient client = new HttpClient(handler);
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
HttpResponseMessage response = client.GetAsync(fileUrl).Result;
|
HttpResponseMessage response = httpClient.GetAsync(fileUrl).Result;
|
||||||
|
|
||||||
if (response.IsSuccessStatusCode)
|
if (response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
@@ -122,7 +118,7 @@ namespace VRCX
|
|||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
client.Dispose();
|
httpClient.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5235,7 +5235,9 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
case 'instance-queue-left':
|
case 'instance-queue-left':
|
||||||
console.log('instance-queue-left', content);
|
console.log('instance-queue-left', content);
|
||||||
$app.instanceQueueClear();
|
var instanceId = content.instanceLocation;
|
||||||
|
$app.removeQueuedInstance(instanceId);
|
||||||
|
// $app.instanceQueueClear();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'content-refresh':
|
case 'content-refresh':
|
||||||
@@ -13732,10 +13734,11 @@ speechSynthesis.getVoices();
|
|||||||
this.lastLocation$ = L;
|
this.lastLocation$ = L;
|
||||||
}
|
}
|
||||||
var hidePrivate = false;
|
var hidePrivate = false;
|
||||||
// (L.accessType === 'group' && !L.groupAccessType) || L.groupAccessType === 'member')
|
|
||||||
if (
|
if (
|
||||||
this.discordHideInvite &&
|
this.discordHideInvite &&
|
||||||
(L.accessType === 'invite' || L.accessType === 'invite+')
|
(L.accessType === 'invite' ||
|
||||||
|
L.accessType === 'invite+' ||
|
||||||
|
L.groupAccessType === 'members')
|
||||||
) {
|
) {
|
||||||
hidePrivate = true;
|
hidePrivate = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user