Skip to content

Commit

Permalink
Code cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
lcarrere committed Nov 21, 2024
1 parent 9ff3dbd commit e7daf0d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions LM-Kit-Maestro/Controls/ChatBoxEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected override void OnHandlerChanged()
AppCompatEditText appCompatEditText = (AppCompatEditText)Handler!.PlatformView!;
using (var gradientDrawable = new GradientDrawable())
{
gradientDrawable.SetColor(global::Android.Graphics.Color.Transparent);
gradientDrawable.SetColor(Android.Graphics.Color.Transparent);
appCompatEditText.SetBackground(gradientDrawable);
appCompatEditText.BackgroundTintList = Android.Content.Res.ColorStateList.ValueOf(Colors.Transparent.ToAndroid());
}
Expand All @@ -49,7 +49,7 @@ protected override void OnHandlerChanged()


#if WINDOWS
private void OnKeyUp(object sender, Microsoft.UI.Xaml.Input.KeyRoutedEventArgs e)
private void OnKeyUp(object sender, KeyRoutedEventArgs e)
{
if (e.Key == VirtualKey.Shift)
{
Expand Down
2 changes: 1 addition & 1 deletion LM-Kit-Maestro/Handlers/CustomEntryHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected override AppCompatEditText CreatePlatformView()

using (var gradientDrawable = new GradientDrawable())
{
gradientDrawable.SetColor(global::Android.Graphics.Color.Transparent);
gradientDrawable.SetColor(Android.Graphics.Color.Transparent);
nativeView.SetBackground(gradientDrawable);
nativeView.BackgroundTintList = Android.Content.Res.ColorStateList.ValueOf(Colors.Transparent.ToAndroid());
}
Expand Down
14 changes: 7 additions & 7 deletions LM-Kit-Maestro/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,23 @@ private static void RegisterViews(this MauiAppBuilder builder)

private static void RegisterServices(this MauiAppBuilder builder)
{
builder.Services.AddSingleton<IPopupNavigation>(MopupService.Instance);
builder.Services.AddSingleton(MopupService.Instance);

builder.Services.AddSingleton<AppSettingsService>();
builder.Services.AddSingleton<ILMKitMaestroDatabase, LMKitMaestroDatabase>();
builder.Services.AddSingleton<ILLMFileManager, LLMFileManager>();
builder.Services.AddSingleton<IAppSettingsService, AppSettingsService>();
builder.Services.AddSingleton<LMKitMaestro.Services.IPopupService, LMKitMaestro.Services.PopupService>();
builder.Services.AddSingleton<LMKitMaestro.Services.ILauncher, LMKitMaestro.Services.Launcher>();
builder.Services.AddSingleton<LMKitMaestro.Services.INavigationService, LMKitMaestro.Services.NavigationService>();
builder.Services.AddSingleton<LMKitMaestro.Services.IMainThread, LMKitMaestro.Services.MainThread>();
builder.Services.AddSingleton<IPopupService, Services.PopupService>();
builder.Services.AddSingleton<Services.ILauncher, Services.Launcher>();
builder.Services.AddSingleton<INavigationService, NavigationService>();
builder.Services.AddSingleton<IMainThread, Services.MainThread>();
builder.Services.AddSingleton<CommunityToolkit.Maui.Core.IPopupService, CommunityToolkit.Maui.PopupService>();

#if WINDOWS
builder.Services.AddSingleton<LMKitMaestro.Services.IFolderPicker, LMKitMaestro.WinUI.FolderPicker>();
builder.Services.AddSingleton<IFolderPicker, WinUI.FolderPicker>();
#endif

builder.Services.AddSingleton<IPreferences>(Preferences.Default);
builder.Services.AddSingleton(Preferences.Default);
builder.Services.AddSingleton<LMKitService>();
builder.Services.AddSingleton<LLMFileManager>();
builder.Services.AddSingleton<HttpClient>();
Expand Down
2 changes: 1 addition & 1 deletion LM-Kit-Maestro/Platforms/Windows/FolderPicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public async Task<FolderPickerResult> PickAsync(string initialPath, Cancellation
{
var result = await CommunityToolkit.Maui.Storage.FolderPicker.PickAsync(initialPath, cancellationToken);

return new LMKitMaestro.Services.FolderPickerResult(result.IsSuccessful,
return new FolderPickerResult(result.IsSuccessful,
result.Folder?.Path, result.Exception);
}
}
2 changes: 1 addition & 1 deletion LM-Kit-Maestro/Services/LLMFileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ private async void OnModelsFolderPathChanged()
await CollectModelFilesAsync();
}

private void OnAppSettingsServicePropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
private void OnAppSettingsServicePropertyChanged(object? sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(IAppSettingsService.ModelsFolderPath))
{
Expand Down
2 changes: 1 addition & 1 deletion LM-Kit-Maestro/ViewModels/MessageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public MessageViewModel(ChatHistory.Message message)
LmKitMessage = message;
}

public MessageViewModel(Models.Message message)
public MessageViewModel(Message message)
{
MessageModel = message;
Sender = message.Sender;
Expand Down

0 comments on commit e7daf0d

Please sign in to comment.