Skip to content

Commit

Permalink
dotnet format
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCodeTraveler committed Jan 14, 2025
1 parent 7439c34 commit ffec96a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ public partial class OfflineSpeechToTextViewModel : BaseViewModel
{
readonly ISpeechToText speechToText;

public SpeechToTextState? State => speechToText.CurrentState;

[ObservableProperty]
string? recognitionText = "Welcome to .NET MAUI Community Toolkit!";

public OfflineSpeechToTextViewModel()
{
// For demo purposes. You can resolve dependency from the DI container,
Expand All @@ -24,6 +19,11 @@ public OfflineSpeechToTextViewModel()
speechToText.RecognitionResultCompleted += HandleRecognitionResultCompleted;
}

public SpeechToTextState? State => speechToText.CurrentState;

[ObservableProperty]
public partial string? RecognitionText { get; set; } = "Welcome to .NET MAUI Community Toolkit!";

[RelayCommand]
async Task StartListen()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void ResultGenerated(SpeechContinuousRecognitionSession sender, SpeechContinuous
}

Task InternalStopListeningAsync(CancellationToken cancellationToken) => StopRecording(cancellationToken);

async Task StopRecording(CancellationToken cancellationToken)
{
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static void DrawStrokes(CanvasDrawingSession session,
static CanvasRenderTarget? GetImageInternal(IList<IDrawingLine> lines, Size size, Paint? background, bool scale = false)
{
var points = lines.SelectMany(x => x.Points).ToList();
if(points.Count is 0)
if (points.Count is 0)
{
return null;
}
Expand Down

0 comments on commit ffec96a

Please # to comment.