Skip to content

Commit 574c339

Browse files
author
Yair Aichenbaum
committed
Moved Update dialog to App.xaml.cs
1 parent bcdcba1 commit 574c339

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

Files/App.xaml.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,18 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
190190
//start tracking app usage
191191
SystemInformation.TrackAppUse(e);
192192

193+
if (SystemInformation.IsAppUpdated)
194+
{
195+
var dialog = new ContentDialog()
196+
{
197+
Title = "What's new in v0.7.3",
198+
Content = "• We are starting to test a brand new design, this is still in the early stages so make sure to send us any feedback on GitHub. \n• We fixed an issue where a swipe gesture was having unexpected side effects. \n• We started work on layout modes, it is not fully functional yet and we will improve it in future updates.",
199+
PrimaryButtonText = "Lets go!"
200+
};
201+
202+
dialog.ShowAsync();
203+
}
204+
193205
Logger.Info("App launched");
194206

195207
bool canEnablePrelaunch = Windows.Foundation.Metadata.ApiInformation.IsMethodPresent("Windows.ApplicationModel.Core.CoreApplication", "EnablePrelaunch");

Files/Views/Pages/ModernShellPage.xaml.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using Files.Interacts;
33
using Files.UserControls;
44
using Files.View_Models;
5-
using Microsoft.Toolkit.Uwp.Helpers;
65
using Microsoft.Toolkit.Uwp.UI.Controls;
76
using System;
87
using System.Linq;
@@ -37,18 +36,6 @@ public ModernShellPage()
3736
App.CurrentInstance.NavigationToolbar.PathControlDisplayText = "New tab";
3837
App.CurrentInstance.NavigationToolbar.CanGoBack = false;
3938
App.CurrentInstance.NavigationToolbar.CanGoForward = false;
40-
41-
if (SystemInformation.IsAppUpdated)
42-
{
43-
var dialog = new ContentDialog()
44-
{
45-
Title = "What's new in v0.7.3",
46-
Content = "• We are starting to test a brand new design, this is still in the early stages so make sure to send us any feedback on GitHub. \n• We fixed an issue where a swipe gesture was having unexpected side effects. \n• We started work on layout modes, it is not fully functional yet and we will improve it in future updates.",
47-
PrimaryButtonText = "Lets go!"
48-
};
49-
50-
dialog.ShowAsync();
51-
}
5239
}
5340

5441
Type IShellPage.CurrentPageType => ItemDisplayFrame.SourcePageType;

0 commit comments

Comments
 (0)