Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Commit

Permalink
153: [Fix] Lock thumbnail size change during init (#173)
Browse files Browse the repository at this point in the history
* lock tumbnailsize change during init

* do not save settings when size notification is suppressed
  • Loading branch information
wuhaochen authored May 2, 2021
1 parent bc06d9a commit e40cbf6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Eve-O-Preview/Presenters/Implementation/MainFormPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public MainFormPresenter(IApplicationController controller, IMainFormView view,

private void Activate()
{
this._suppressSizeNotifications = true;
this.LoadApplicationSettings();
this.View.SetDocumentationUrl(MainFormPresenter.FORUM_URL);
this.View.SetVersionInfo(this.GetApplicationVersion());
Expand All @@ -58,6 +59,7 @@ private void Activate()
}

this._mediator.Send(new StartService());
this._suppressSizeNotifications = false;
}

private void Minimize()
Expand Down Expand Up @@ -87,10 +89,9 @@ private void Close(ViewCloseRequest request)

private async void UpdateThumbnailsSize()
{
this.SaveApplicationSettings();

if (!this._suppressSizeNotifications)
{
this.SaveApplicationSettings();
await this._mediator.Publish(new ThumbnailConfiguredSizeUpdated());
}
}
Expand Down

0 comments on commit e40cbf6

Please sign in to comment.