Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/PackageUploader.UI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ public MainWindow(UserLoggedInProvider userLoggedInProvider, IAuthenticationServ
// Set version display
VersionText.Text = string.Format(UI.Resources.Strings.MainPage.VersionLabel, GetSimpleVersion());

// Set initial window size before Show() so it opens at the correct dimensions
if (_compactModeProvider.IsCompactMode)
{
Width = 600;
Height = 420;
}

// Sync icons with initial state
UpdateCompactModeIcon();
}
Expand Down
3 changes: 0 additions & 3 deletions src/PackageUploader.UI/Providers/CompactModeProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public class CompactModeProvider : INotifyPropertyChanged

public CompactModeProvider()
{
// Read initial state from the shared settings cache (loaded once at startup by BaseViewModel).
var stored = ViewModel.BaseViewModel.GetExternalSetting(SettingsKey);
_isCompactMode = bool.TryParse(stored, out var result) && result;
}
Expand All @@ -27,8 +26,6 @@ public bool IsCompactMode
if (_isCompactMode != value)
{
_isCompactMode = value;
// Route through the shared in-memory cache so BaseViewModel.SaveSettings()
// never overwrites this value with a stale copy.
ViewModel.BaseViewModel.SetExternalSetting(SettingsKey, value.ToString());
OnPropertyChanged();
}
Expand Down
Loading