Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions windows/winui/MainWindow.xaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3307,6 +3307,10 @@ fire_and_forget MainWindow::ConfigureAICommitClick(IInspectable const&, RoutedEv
}

void MainWindow::CheckForUpdatesClick(IInspectable const&, RoutedEventArgs const&) {
checkForUpdates();
}

void MainWindow::checkForUpdates() {
#if defined(_M_ARM64)
session_->checkForUpdates("arm64");
#elif defined(_M_X64)
Expand Down Expand Up @@ -4013,6 +4017,10 @@ void MainWindow::RootLoaded(IInspectable const&, RoutedEventArgs const&) {
} else {
showWorkbenchSurface();
}
if (!startupUpdateCheckStarted_) {
startupUpdateCheckStarted_ = true;
checkForUpdates();
}
}

void MainWindow::showWelcomeSurface() {
Expand Down
2 changes: 2 additions & 0 deletions windows/winui/MainWindow.xaml.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ struct MainWindow : MainWindowT<MainWindow> {
private:
void showWelcomeSurface();
void showWorkbenchSurface();
void checkForUpdates();
void renderWelcomeProjects(std::string query = {});
struct NavigationTarget {
std::string relativePath;
Expand Down Expand Up @@ -412,6 +413,7 @@ struct MainWindow : MainWindowT<MainWindow> {
bool externalConflictVisible_ = false;
bool terminalUiUpdating_ = false;
bool showWelcomeOnLoad_ = false;
bool startupUpdateCheckStarted_ = false;
std::uint64_t terminalRevision_ = 0;
double bottomPanelHeight_ = 290.0;
};
Expand Down
Loading