Fixed broken build after compoer fonts merge (#288)
This commit is contained in:
@@ -38,23 +38,23 @@ namespace Wino.Mail.ViewModels
|
||||
_fontService = fontService;
|
||||
PreferencesService = preferencesService;
|
||||
|
||||
CurrentReaderFont = fontService.GetCurrentReaderFont();
|
||||
CurrentReaderFontSize = fontService.GetCurrentReaderFontSize();
|
||||
CurrentReaderFont = preferencesService.ReaderFont;
|
||||
CurrentReaderFontSize = preferencesService.ReaderFontSize;
|
||||
|
||||
CurrentComposerFont = fontService.GetCurrentComposerFont();
|
||||
CurrentComposerFontSize = fontService.GetCurrentComposerFontSize();
|
||||
CurrentComposerFont = preferencesService.ComposerFont;
|
||||
CurrentComposerFontSize = preferencesService.ComposerFontSize;
|
||||
}
|
||||
|
||||
public void Receive(PropertyChangedMessage<string> message)
|
||||
{
|
||||
if (message.PropertyName == nameof(CurrentReaderFont) && message.OldValue != message.NewValue)
|
||||
{
|
||||
_fontService.SetReaderFont(message.NewValue);
|
||||
PreferencesService.ReaderFont = message.NewValue;
|
||||
}
|
||||
|
||||
if (message.PropertyName == nameof(CurrentComposerFont) && message.OldValue != message.NewValue)
|
||||
{
|
||||
_fontService.SetComposerFont(message.NewValue);
|
||||
PreferencesService.ComposerFont = message.NewValue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,11 +62,11 @@ namespace Wino.Mail.ViewModels
|
||||
{
|
||||
if (message.PropertyName == nameof(CurrentReaderFontSize))
|
||||
{
|
||||
_fontService.SetReaderFontSize(CurrentReaderFontSize);
|
||||
PreferencesService.ReaderFontSize = CurrentReaderFontSize;
|
||||
}
|
||||
else if (message.PropertyName == nameof(CurrentComposerFontSize))
|
||||
{
|
||||
_fontService.SetComposerFontSize(CurrentComposerFontSize);
|
||||
PreferencesService.ComposerFontSize = CurrentComposerFontSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Wino.Views
|
||||
IRecipient<ApplicationThemeChanged>,
|
||||
IRecipient<SaveAsPDFRequested>
|
||||
{
|
||||
private readonly IFontService _fontService = App.Current.Services.GetService<IFontService>();
|
||||
private readonly IPreferencesService _preferencesService = App.Current.Services.GetService<IPreferencesService>();
|
||||
private readonly IDialogService _dialogService = App.Current.Services.GetService<IDialogService>();
|
||||
|
||||
private bool isRenderingInProgress = false;
|
||||
@@ -271,10 +271,10 @@ namespace Wino.Views
|
||||
|
||||
private async Task UpdateReaderFontPropertiesAsync()
|
||||
{
|
||||
await ExecuteScriptFunctionAsync("ChangeFontSize", _fontService.GetCurrentReaderFontSize());
|
||||
await ExecuteScriptFunctionAsync("ChangeFontSize", _preferencesService.ReaderFontSize);
|
||||
|
||||
// Prepare font family name with fallback to sans-serif by default.
|
||||
var fontName = _fontService.GetCurrentReaderFont();
|
||||
var fontName = _preferencesService.ReaderFont;
|
||||
|
||||
// If font family name is not supported by the browser, fallback to sans-serif.
|
||||
fontName += ", sans-serif";
|
||||
|
||||
Reference in New Issue
Block a user