| 75 | } |
| 76 | |
| 77 | fire_and_forget MainPage::Page_Loaded(IInspectable const&, RoutedEventArgs const&) |
| 78 | { |
| 79 | try { |
| 80 | const auto loadConfigsTask = LoadConfigs(); |
| 81 | NavigationManager = SystemNavigationManager::GetForCurrentView(); |
| 82 | NavigationManager.AppViewBackButtonVisibility(MainSplitView().IsPaneOpen() |
| 83 | ? AppViewBackButtonVisibility::Collapsed |
| 84 | : AppViewBackButtonVisibility::Visible); |
| 85 | |
| 86 | const auto weakThis = get_weak(); |
| 87 | NavigationManager.BackRequested([weakThis](const auto&, const auto&) { |
| 88 | if (const auto self{ weakThis.get() }) { |
| 89 | self->MainSplitView().IsPaneOpen(true); |
| 90 | const auto currentVisibility = NavigationManager.AppViewBackButtonVisibility(); |
| 91 | if (currentVisibility == AppViewBackButtonVisibility::Visible) { |
| 92 | NavigationManager.AppViewBackButtonVisibility(AppViewBackButtonVisibility::Disabled); |
| 93 | } |
| 94 | } |
| 95 | }); |
| 96 | |
| 97 | StartConnectionCheck(); |
| 98 | co_await loadConfigsTask; |
| 99 | } |
| 100 | catch (...) |
| 101 | { |
| 102 | UI::NotifyException(L"Loading MainPage"); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | IAsyncAction MainPage::NotifyUser(const hstring& message) { |
| 107 | ContentDialog dialog; |
nothing calls this directly
no outgoing calls
no test coverage detected