Skip to content

Commit

Permalink
修复侧键返回逻辑 (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
Richasy authored Sep 28, 2024
1 parent 24bd493 commit c6b8552
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Bili Copilot. All rights reserved.

using BiliCopilot.UI.Forms;
using BiliCopilot.UI.Models.Constants;
using BiliCopilot.UI.Toolkits;
using BiliCopilot.UI.ViewModels.Core;
Expand Down Expand Up @@ -248,6 +249,10 @@ private void OnRootPointerPressed(object sender, PointerRoutedEventArgs e)
ViewModel.ToggleFullScreenCommand.Execute(default);
}
}
else if (this.Get<AppViewModel>().ActivatedWindow is MainWindow)
{
this.Get<NavigationViewModel>().Back();
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@ public void SetContent(UIElement element)
/// <inheritdoc/>
public void Dispose()
{
if (_desktopWindowXamlSource != null)
{
_desktopWindowXamlSource.Content = default;
_desktopWindowXamlSource?.SiteBridge?.Dispose();
_desktopWindowXamlSource?.Dispose();
}
_desktopWindowXamlSource?.Dispose();
}
}

0 comments on commit c6b8552

Please sign in to comment.