More adjustments to context menu
This commit is contained in:
1 parent
96916f6c37
commit
4ab7f74a4e
2 files changed
+22
-6
No files matched your search
@@ -154,17 +154,22 @@ function GetContextMenuOptionsForItem(rowItem as object) as object
|
|||||||
options.push(ContextMenuUtils.CreateOption("Play", m.videoQueue, "FuncPlayVideo", [rowItem]))
|
options.push(ContextMenuUtils.CreateOption("Play", m.videoQueue, "FuncPlayVideo", [rowItem]))
|
||||||
options.push(ContextMenuUtils.CreateOption("Queue", m.videoQueue, "FuncAddToQueueVideo", [rowItem]))
|
options.push(ContextMenuUtils.CreateOption("Queue", m.videoQueue, "FuncAddToQueueVideo", [rowItem]))
|
||||||
|
|
||||||
item = ContextMenuUtils.CreateOption("Open channel", m.top, "OpenVideoChannel", [rowItem])
|
authorId = rowItem.authorId
|
||||||
options.push(item)
|
if not StringUtils.IsNullOrEmpty(authorId)
|
||||||
|
options.push(ContextMenuUtils.CreateOption("Open channel", m.top, "OpenVideoChannel", [rowItem]))
|
||||||
|
end if
|
||||||
else if rowItem.type = "playlist"
|
else if rowItem.type = "playlist"
|
||||||
options.push(ContextMenuUtils.CreateOption("Play", m.videoQueue, "FuncPlayPlaylist", [rowItem, 0]))
|
options.push(ContextMenuUtils.CreateOption("Play", m.videoQueue, "FuncPlayPlaylist", [rowItem, 0]))
|
||||||
options.push(ContextMenuUtils.CreateOption("Queue", m.videoQueue, "FuncAddToQueuePlaylist", [rowItem]))
|
options.push(ContextMenuUtils.CreateOption("Queue", m.videoQueue, "FuncAddToQueuePlaylist", [rowItem]))
|
||||||
|
|
||||||
item = ContextMenuUtils.CreateOption("Open", m.top, "OpenPlaylist", [rowItem])
|
options.push(ContextMenuUtils.CreateOption("Open playlist", m.top, "OpenPlaylist", [rowItem]))
|
||||||
options.push(item)
|
|
||||||
|
authorId = rowItem.authorId
|
||||||
|
if not StringUtils.IsNullOrEmpty(authorId)
|
||||||
|
options.push(ContextMenuUtils.CreateOption("Open channel", m.top, "OpenPlaylistChannel", [rowItem]))
|
||||||
|
end if
|
||||||
else if rowItem.type = "channel"
|
else if rowItem.type = "channel"
|
||||||
item = ContextMenuUtils.CreateOption("Open", m.top, "OpenChannel", [rowItem])
|
options.push(ContextMenuUtils.CreateOption("Open", m.top, "OpenChannel", [rowItem]))
|
||||||
options.push(item)
|
|
||||||
else
|
else
|
||||||
LogWarn("Unknown long pressed item type:", rowItem.type)
|
LogWarn("Unknown long pressed item type:", rowItem.type)
|
||||||
return []
|
return []
|
||||||
@@ -191,6 +196,16 @@ function OpenVideoChannel(video as object) as void
|
|||||||
ChannelUtils.Open(channel)
|
ChannelUtils.Open(channel)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function OpenPlaylistChannel(playlist as object) as void
|
||||||
|
authorId = playlist.authorId
|
||||||
|
if StringUtils.IsNullOrEmpty(authorId)
|
||||||
|
LogWarn("Invalid authorId:", authorId)
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
channel = InvidiousContent.ToChannelContentNode(invalid, { authorId: authorId }, invalid)
|
||||||
|
ChannelUtils.Open(channel)
|
||||||
|
end function
|
||||||
|
|
||||||
function Refresh(unsued as dynamic)
|
function Refresh(unsued as dynamic)
|
||||||
InitContent()
|
InitContent()
|
||||||
end function
|
end function
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
<function name="OpenPlaylist" />
|
<function name="OpenPlaylist" />
|
||||||
<function name="OpenChannel" />
|
<function name="OpenChannel" />
|
||||||
<function name="OpenVideoChannel" />
|
<function name="OpenVideoChannel" />
|
||||||
|
<function name="OpenPlaylistChannel" />
|
||||||
<function name="Refresh" />
|
<function name="Refresh" />
|
||||||
</interface>
|
</interface>
|
||||||
</component>
|
</component>
|
||||||
Reference in new issue
Block a user