Skip to content

Commit d787bba

Browse files
committed
Display message box with button
1 parent 3d555e7 commit d787bba

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Flow.Launcher/Languages/en.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,8 @@
369369
<system:String x:Key="seeMoreReleaseNotes">See more release notes on GitHub</system:String>
370370
<system:String x:Key="checkNetworkConnectionTitle">Failed to fetch release notes</system:String>
371371
<system:String x:Key="checkNetworkConnectionSubTitle">Please check your network connection or ensure GitHub is accessible</system:String>
372+
<system:String x:Key="appUpdateTitle">Flow Launcher has been updated to {0}</system:String>
373+
<system:String x:Key="appUpdateButtonContent">Click here to view the release notes</system:String>
372374

373375
<!-- FileManager Setting Dialog -->
374376
<system:String x:Key="fileManagerWindow">Select File Manager</system:String>

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,18 @@ private void OnLoaded(object sender, RoutedEventArgs _)
140140
// Update release notes version
141141
_settings.ReleaseNotesVersion = Constant.Version;
142142

143-
var releaseNotesWindow = new ReleaseNotesWindow();
144-
releaseNotesWindow.Show();
143+
// Display message box with button
144+
App.API.ShowMsgWithButton(
145+
string.Format(App.API.GetTranslation("appUpdateTitle"), Constant.Version),
146+
App.API.GetTranslation("appUpdateButtonContent"),
147+
() =>
148+
{
149+
Application.Current.Dispatcher.Invoke(() =>
150+
{
151+
var releaseNotesWindow = new ReleaseNotesWindow();
152+
releaseNotesWindow.Show();
153+
});
154+
});
145155
}
146156

147157
// Initialize place holder

0 commit comments

Comments
 (0)