qwen edit

This commit is contained in:
Курнат Андрей
2026-02-18 14:21:53 +03:00
parent 55c620f5a3
commit 8cb459c832
21 changed files with 287 additions and 125 deletions

View File

@@ -11,6 +11,7 @@ public partial class ReaderViewModel : BaseViewModel
{
private readonly IDatabaseService _databaseService;
private readonly ISettingsService _settingsService;
private readonly INavigationService _navigationService;
[ObservableProperty]
private Book? _book;
@@ -81,11 +82,15 @@ public partial class ReaderViewModel : BaseViewModel
public event Action<string>? OnJavaScriptRequested;
public event Action? OnBookReady;
public ReaderViewModel(IDatabaseService databaseService, ISettingsService settingsService)
public ReaderViewModel(
IDatabaseService databaseService,
ISettingsService settingsService,
INavigationService navigationService)
{
_databaseService = databaseService;
_settingsService = settingsService;
_fontSize = 18;
_navigationService = navigationService;
_fontSize = Constants.Reader.DefaultFontSize;
}
public async Task InitializeAsync()
@@ -104,7 +109,7 @@ public partial class ReaderViewModel : BaseViewModel
return;
}
var savedFontSize = await _settingsService.GetIntAsync(SettingsKeys.DefaultFontSize, 18);
var savedFontSize = await _settingsService.GetIntAsync(SettingsKeys.DefaultFontSize, Constants.Reader.DefaultFontSize);
var savedFontFamily = await _settingsService.GetAsync(SettingsKeys.DefaultFontFamily, "serif");
FontSize = savedFontSize;