We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c2c9ab commit db1afa9Copy full SHA for db1afa9
src/Files.App/Data/Models/AppModel.cs
@@ -58,11 +58,16 @@ public bool IsPasteEnabled
58
set => SetProperty(ref isPasteEnabled, value);
59
}
60
61
- private bool isMainWindowClosed = false;
+ private volatile int isMainWindowClosed = 0;
62
public bool IsMainWindowClosed
63
{
64
- get => isMainWindowClosed;
65
- set => SetProperty(ref isMainWindowClosed, value);
+ get => isMainWindowClosed == 1;
+ set
66
+ {
67
+ int orig = Interlocked.Exchange(ref isMainWindowClosed, value ? 1 : 0);
68
+ if (isMainWindowClosed != orig)
69
+ OnPropertyChanged();
70
+ }
71
72
73
private int propertiesWindowCount = 0;
0 commit comments