Merge pull request #4313 from Flow-Launcher/InitProgressbarAnimation_Null

Move progress bar animation init to Loaded event to fix possible null exception of ProgressBar
This commit is contained in:
Jeremy Wu 2026-03-08 21:30:02 +11:00 committed by Jeremy
parent ef494c5f22
commit 4a098cc071
2 changed files with 6 additions and 3 deletions

View file

@ -342,6 +342,7 @@
Margin="12 0 12 0"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
Loaded="ProgressBar_Loaded"
StrokeThickness="2"
Visibility="{Binding ProgressBarVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
X1="-100"

View file

@ -199,9 +199,6 @@ namespace Flow.Launcher
ThemeManager.Current.ApplicationTheme = ApplicationTheme.Dark;
}
// Initialize position
InitProgressbarAnimation();
// Force update position
UpdatePosition();
@ -353,6 +350,11 @@ namespace Flow.Launcher
}
}
private void ProgressBar_Loaded(object sender, RoutedEventArgs e)
{
InitProgressbarAnimation();
}
private async void OnClosing(object sender, CancelEventArgs e)
{
if (!CanClose)