Playlet backend channel sort options (#649)

* Playlet backend channel sort options

* tweak
This commit is contained in:
Brahim Hadriche authored and GitHub committed 2025-06-10 09:29:55 -04:00
1 parent 68aeec3d6f
commit d054dd64a5
7 files changed
+159 -26

No files matched your search

@@ -349,14 +349,17 @@ function GetSortingContextMenuOptionsForItem(video as object) as object
end if
feedSource = feedSources[0]
endpoint = feedSource.endpoint
if not m.sortOptions.DoesExist(endpoint)
return []
sortOptions = feedSource.state.sortOptions
if not IsArray(sortOptions)
endpoint = feedSource.endpoint
if not m.sortOptions.DoesExist(endpoint)
return []
end if
sortOptions = m.sortOptions[endpoint]
end if
title = Tr(Locale.Dialogs.SortFeedBy).replace("%1", `"${feedSource.title}"`)
sortOptions = m.sortOptions[endpoint]
return [ContextMenuUtils.CreateOption(title + "...", m.top, "ShowSortDialog", [title, sortOptions, feedContentNode])]
end function