mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
disable interaction when page is initializing
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
shuxc:NavigationViewHelper.PaneCornerRadius="0"
|
||||
CompactPaneLength="48"
|
||||
IsBackEnabled="{x:Bind ContentFrame.CanGoBack, Mode=OneWay}"
|
||||
IsEnabled="{Binding ElementName=ContentFrame, Path=Content.DataContext.IsInitialized, Mode=OneWay}"
|
||||
IsPaneOpen="True"
|
||||
OpenPaneLength="192"
|
||||
PaneDisplayMode="Left"
|
||||
|
||||
@@ -74,9 +74,12 @@ internal sealed partial class CultivationViewModel : Abstraction.ViewModel
|
||||
{
|
||||
if (await metadataService.InitializeAsync().ConfigureAwait(false))
|
||||
{
|
||||
await taskContext.SwitchToMainThreadAsync();
|
||||
Projects = cultivationService.Projects;
|
||||
Projects.MoveCurrentTo(Projects.SourceCollection.SelectedOrDefault());
|
||||
using (await EnterCriticalSectionAsync().ConfigureAwait(false))
|
||||
{
|
||||
await taskContext.SwitchToMainThreadAsync();
|
||||
Projects = cultivationService.Projects;
|
||||
Projects.MoveCurrentTo(Projects.SourceCollection.SelectedOrDefault());
|
||||
}
|
||||
|
||||
// Force update when re-entering the page
|
||||
if (Projects.CurrentItem is not null && CultivateEntries is null)
|
||||
|
||||
Reference in New Issue
Block a user