@@ -20,6 +20,8 @@ using namespace winrt::Windows::UI::Xaml::Navigation;
2020
2121namespace winrt ::Microsoft::Terminal::Settings::Editor::implementation
2222{
23+ static constexpr std::wstring_view ExtensionPageId{ L" page.extensions" };
24+
2325 Extensions::Extensions ()
2426 {
2527 InitializeComponent ();
@@ -35,7 +37,9 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
3537 void Extensions::OnNavigatedTo (const NavigationEventArgs& e)
3638 {
3739 _ViewModel = e.Parameter ().as <Editor::ExtensionsViewModel>();
38- get_self<ExtensionsViewModel>(_ViewModel)->ExtensionPackageIdentifierTemplateSelector (_extensionPackageIdentifierTemplateSelector);
40+ auto vmImpl = get_self<ExtensionsViewModel>(_ViewModel);
41+ vmImpl->ExtensionPackageIdentifierTemplateSelector (_extensionPackageIdentifierTemplateSelector);
42+ vmImpl->MarkAsVisited ();
3943 }
4044
4145 void Extensions::ExtensionNavigator_Click (const IInspectable& sender, const RoutedEventArgs& /* args*/ )
@@ -194,6 +198,11 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
194198 return _ExtensionPackageIdentifierTemplateSelector.SelectTemplate (CurrentExtensionPackage ());
195199 }
196200
201+ bool ExtensionsViewModel::DisplayBadge () const noexcept
202+ {
203+ return !Model::ApplicationState::SharedInstance ().BadgeDismissed (ExtensionPageId);
204+ }
205+
197206 // Returns true if the extension is enabled, false otherwise
198207 bool ExtensionsViewModel::GetExtensionState (hstring extensionSource, const Model::CascadiaSettings& settings)
199208 {
@@ -254,6 +263,12 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
254263 NavigateToColorSchemeRequested.raise (*this , nullptr );
255264 }
256265
266+ void ExtensionsViewModel::MarkAsVisited ()
267+ {
268+ Model::ApplicationState::SharedInstance ().DismissBadge (ExtensionPageId);
269+ _NotifyChanges (L" DisplayBadge" );
270+ }
271+
257272 hstring ExtensionPackageViewModel::Scope () const noexcept
258273 {
259274 return _package.Scope () == Model::FragmentScope::User ? RS_ (L" Extensions_ScopeUser" ) : RS_ (L" Extensions_ScopeSystem" );
0 commit comments