Skip to content

Commit

Permalink
delete useless code of pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Scighost committed Jan 15, 2024
1 parent 5c34483 commit 9fe1b50
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/Starward/Pages/HoyolabToolbox/LoginPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Navigation;
using Microsoft.Web.WebView2.Core;
using Starward.Core;
using Starward.Messages;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected override async void OnLoaded()
await Task.Delay(16);
await InitializeDataAsync();
}



[ObservableProperty]
Expand Down
1 change: 0 additions & 1 deletion src/Starward/Pages/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
xmlns:s="using:Starward"
xmlns:sct="using:Starward.Controls.TitleBarGameIcon"
x:DefaultBindMode="OneWay"
SizeChanged="Page_SizeChanged"
mc:Ignorable="d">


Expand Down
8 changes: 0 additions & 8 deletions src/Starward/Pages/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,6 @@ private void RegisterMessage()




private void Page_SizeChanged(object sender, SizeChangedEventArgs e)
{
UpdateDragRectangles();
}



private async Task CheckUpdateAsync()
{
try
Expand Down
2 changes: 0 additions & 2 deletions src/Starward/Pages/ScreenshotPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
xmlns:sm="using:Starward.Models"
xmlns:ui="using:CommunityToolkit.WinUI.UI"
x:DefaultBindMode="OneWay"
Loaded="Page_Loaded"
Unloaded="Page_Unloaded"
mc:Ignorable="d">

<Page.Resources>
Expand Down
5 changes: 3 additions & 2 deletions src/Starward/Pages/ScreenshotPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,18 @@ protected override void OnNavigatedTo(NavigationEventArgs e)



private async void Page_Loaded(object sender, RoutedEventArgs e)
protected override async void OnLoaded()
{
await Task.Delay(16);
Initialize();
}



private void Page_Unloaded(object sender, RoutedEventArgs e)
protected override void OnUnloaded()
{
Watcher?.Dispose();
GC.Collect();
}


Expand Down

0 comments on commit 9fe1b50

Please sign in to comment.