Skip to content

Commit 260949b

Browse files
committed
Fix double onloaded calls for dialogs
1 parent 971a508 commit 260949b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

StabilityMatrix.Avalonia/Controls/BetterContentDialog.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,10 +391,11 @@ private void OnLoaded(object? sender, RoutedEventArgs? e)
391391
}
392392

393393
// Also call the vm's OnLoad
394-
if (Content is Control { DataContext: ViewModelBase viewModel })
394+
// (UserControlBase handles this now, so we don't need to)
395+
/*if (Content is Control { DataContext: ViewModelBase viewModel })
395396
{
396397
viewModel.OnLoaded();
397398
Dispatcher.UIThread.InvokeAsync(viewModel.OnLoadedAsync).SafeFireAndForget();
398-
}
399+
}*/
399400
}
400401
}

0 commit comments

Comments
 (0)