File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -252,16 +252,19 @@ namespace winrt::CelestiaAppComponent::implementation
252252 return LocalizationHelper::Localize (L" No overview available." , L" No overview for an object" );
253253 }
254254
255- winrt::com_array <CelestiaAppComponent::OverviewTimeLink> SelectionHelper::GetTimeLinks (CelestiaSelection const & selection, CelestiaAppCore const & appCore)
255+ Windows::Foundation::Collections::IVector <CelestiaAppComponent::OverviewTimeLink> SelectionHelper::GetTimeLinks (CelestiaSelection const & selection, CelestiaAppCore const & appCore)
256256 {
257+ auto result = single_threaded_vector<CelestiaAppComponent::OverviewTimeLink>();
257258 auto obj = selection.Object ();
258- if (obj == nullptr ) return {} ;
259+ if (obj == nullptr ) return result ;
259260 auto body = obj.try_as <CelestiaBody>();
260261 if (body != nullptr )
261262 {
262- auto links = GetBodyTimeLinks (body, appCore);
263- return winrt::com_array<CelestiaAppComponent::OverviewTimeLink>(links);
263+ for (auto const & link : GetBodyTimeLinks (body, appCore))
264+ {
265+ result.Append (link);
266+ }
264267 }
265- return {} ;
268+ return result ;
266269 }
267270}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ namespace winrt::CelestiaAppComponent::implementation
1717 struct SelectionHelper : SelectionHelperT<SelectionHelper>
1818 {
1919 static hstring GetOverview (CelestiaComponent::CelestiaSelection const & selection, CelestiaComponent::CelestiaAppCore const & appCore);
20- static winrt::com_array <CelestiaAppComponent::OverviewTimeLink> GetTimeLinks (CelestiaComponent::CelestiaSelection const & selection, CelestiaComponent::CelestiaAppCore const & appCore);
20+ static Windows::Foundation::Collections::IVector <CelestiaAppComponent::OverviewTimeLink> GetTimeLinks (CelestiaComponent::CelestiaSelection const & selection, CelestiaComponent::CelestiaAppCore const & appCore);
2121 };
2222}
2323
Original file line number Diff line number Diff line change @@ -21,6 +21,6 @@ namespace CelestiaAppComponent
2121 runtimeclass SelectionHelper
2222 {
2323 static String GetOverview(CelestiaComponent.CelestiaSelection selection, CelestiaComponent.CelestiaAppCore appCore);
24- static OverviewTimeLink[] GetTimeLinks(CelestiaComponent.CelestiaSelection selection, CelestiaComponent.CelestiaAppCore appCore);
24+ static Windows.Foundation.Collections.IVector< OverviewTimeLink> GetTimeLinks(CelestiaComponent.CelestiaSelection selection, CelestiaComponent.CelestiaAppCore appCore);
2525 };
2626}
Original file line number Diff line number Diff line change 188188 <ActivatableClass ActivatableClassId =" CelestiaAppComponent.RequestResult" ThreadingModel =" both" />
189189 <ActivatableClass ActivatableClassId =" CelestiaAppComponent.ResourceItem" ThreadingModel =" both" />
190190 <ActivatableClass ActivatableClassId =" CelestiaAppComponent.SearchObjectEntry" ThreadingModel =" both" />
191+ <ActivatableClass ActivatableClassId =" CelestiaAppComponent.SelectionHelper" ThreadingModel =" both" />
191192 <ActivatableClass ActivatableClassId =" CelestiaAppComponent.SettingBaseItem" ThreadingModel =" both" />
192193 <ActivatableClass ActivatableClassId =" CelestiaAppComponent.SettingBooleanItem" ThreadingModel =" both" />
193194 <ActivatableClass ActivatableClassId =" CelestiaAppComponent.SettingInt32Item" ThreadingModel =" both" />
You can’t perform that action at this time.
0 commit comments