Skip to content

Commit

Permalink
adds request for Microphone access (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bod9001 authored Dec 12, 2024
1 parent dd8976b commit 719a5a2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,25 @@ The main purpose of this Prompt is to allow the Variable viewer (Variable editin
What follows is given by the build, we do not control what is written in the Following text So treat with caution and use your brain
Justification : " + requests[1]); //TODO Add text

string response = await msgBox.ShowAsync();
Log.Information($"response {response}");
await _writer.WriteLineAsync(response == "No" ? false.ToString() : true.ToString());
await _writer.FlushAsync();
return Task.CompletedTask;
});
}
else if (ClientRequest.Microphone_Access.ToString() == requests[0])
{
RxApp.MainThreadScheduler.ScheduleAsync(async (_, _) =>
{
IMsBox<string> msgBox = MessageBoxBuilder.CreateMessageBox(
MessageBoxButtons.YesNo,
string.Empty,
$"The build would like to Access your microphone" + @"
Do you allow this application to access your microphone for while it is open
Justification given by the Fork : " + requests[1]);


string response = await msgBox.ShowAsync();
Log.Information($"response {response}");
await _writer.WriteLineAsync(response == "No" ? false.ToString() : true.ToString());
Expand Down
1 change: 1 addition & 0 deletions UnitystationLauncher/Models/Enums/ClientRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ internal enum ClientRequest
URL = 1,
API_URL = 2,
Host_Trust_Mode = 3,
Microphone_Access = 4
}

0 comments on commit 719a5a2

Please sign in to comment.