mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-24 00:33:14 +00:00
include "All Feeds" in keyboard navigation
This commit is contained in:
parent
4225e06db9
commit
79704d81c2
@ -23,13 +23,14 @@ const helperFunctions = {
|
|||||||
navigateToFeed: function(relativePosition) {
|
navigateToFeed: function(relativePosition) {
|
||||||
// create a list with feed and folders guids, ignore feeds in collapsed folders
|
// create a list with feed and folders guids, ignore feeds in collapsed folders
|
||||||
// Example result with folder 2 collapsed:
|
// Example result with folder 2 collapsed:
|
||||||
// ['folder:1','feed:1','feed:2','folder:2', 'folder:3','feed:3']
|
// ['','folder:1','feed:1','feed:2','folder:2', 'folder:3','feed:3']
|
||||||
const navigationList = vm.foldersWithFeeds.map(
|
// The empty string is the "All Feeds" option
|
||||||
|
const navigationList = [''].concat(vm.foldersWithFeeds.map(
|
||||||
folder =>
|
folder =>
|
||||||
folder.is_expanded
|
folder.is_expanded
|
||||||
? ['folder:'+folder.id].concat(folder.feeds.map(feed=>'feed:'+feed.id))
|
? ['folder:'+folder.id].concat(folder.feeds.map(feed=>'feed:'+feed.id))
|
||||||
: 'folder:'+folder.id
|
: 'folder:'+folder.id
|
||||||
).flat()
|
).flat())
|
||||||
const currentFeedPosition = navigationList.indexOf(vm.feedSelected)
|
const currentFeedPosition = navigationList.indexOf(vm.feedSelected)
|
||||||
if(currentFeedPosition== -1){
|
if(currentFeedPosition== -1){
|
||||||
// feed not found error
|
// feed not found error
|
||||||
|
Loading…
x
Reference in New Issue
Block a user