153: [Fix] Lock thumbnail size change during init (#173)

* lock tumbnailsize change during init

* do not save settings when size notification is suppressed
This commit is contained in:
Haochen Wu
2021-05-02 12:12:47 -07:00
committed by GitHub
parent bc06d9ae9c
commit e40cbf620e

View File

@@ -49,6 +49,7 @@ namespace EveOPreview.Presenters
private void Activate()
{
this._suppressSizeNotifications = true;
this.LoadApplicationSettings();
this.View.SetDocumentationUrl(MainFormPresenter.FORUM_URL);
this.View.SetVersionInfo(this.GetApplicationVersion());
@@ -58,6 +59,7 @@ namespace EveOPreview.Presenters
}
this._mediator.Send(new StartService());
this._suppressSizeNotifications = false;
}
private void Minimize()
@@ -87,10 +89,9 @@ namespace EveOPreview.Presenters
private async void UpdateThumbnailsSize()
{
this.SaveApplicationSettings();
if (!this._suppressSizeNotifications)
{
this.SaveApplicationSettings();
await this._mediator.Publish(new ThumbnailConfiguredSizeUpdated());
}
}