Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/new ble #12

Open
wants to merge 21 commits into
base: feature/aha
Choose a base branch
from
Open

Feature/new ble #12

wants to merge 21 commits into from

Conversation

Alex-J-Lopez
Copy link
Collaborator

No description provided.

Copy link
Contributor

deepsource-io bot commented Nov 24, 2024

Here's the code health analysis summary for commits d0071a1..fe79f1e. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource C & C++ LogoC & C++✅ SuccessView Check ↗
DeepSource C# LogoC#❌ Failure
❗ 47 occurences introduced
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Alex-J-Lopez and others added 2 commits November 24, 2024 13:03
* Initial Context Quiz UI Enhanced (#6)

* Adding Localization to context quiz

* All Language Translation Now Works

* Eveything works now sort off

* style: format code with ClangFormat and dotnet-format

This commit fixes the style issues introduced in 8ecca7b according to the output
from ClangFormat and dotnet-format.

Details: #11

---------

Co-authored-by: mazenham1d <[email protected]>
Co-authored-by: hamidm <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

// Get the stream from the embedded resource
using var stream = await FileSystem.OpenAppPackageFileAsync(fileName);
using var reader = new StreamReader(stream);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explicitly state the variable types?

}

//private void OnDeviceAdvertised(object sender, DeviceEventArgs args)
//{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented out code


private void OnDeviceDiscovered(object sender, DeviceEventArgs args)
{
CheckAndRaiseEvent(args.Device);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless you foresee CheckAndRaiseEvent being used elsewhere in the code, could you move it back into this function?


public async Task StartScanningAsync()
{
if (!_bluetoothManager.IsOn)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to check for this


public void StopScanning()
{
_scanCancellationTokenSource?.Cancel();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you do a null check?

//{
// // Build WebSocket handshake request
// var handshakeRequest = new StringBuilder();
// handshakeRequest.AppendLine($"GET {webSocketUri.Host}{webSocketUri.PathAndQuery} HTTP/1.1");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete

// //Dns.GetHostName will need to be removed if we want to test this nonlocally & Dns.GetHostEntry
// //will be replaced with whichever host the service is talking to
// string hostName = "o-chi.pcr.dog";
// IPHostEntry ipHostInfo = Dns.GetHostEntry(hostName);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Aha.Views.Website">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still use this?

<!-- Top Color Bar -->
<BoxView
HeightRequest="50"
BackgroundColor="#C1E0F4"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a nit but we could probably swap out the hardcoded background colors with the ones in the resource folder.

SaveContextCommand = new Command(SaveContext);
}

private async void SaveContext(object obj)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we use "object"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants