qwen edit
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user