1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 15:25:56 +00:00

implement basic hotkeys map support in digest; implement next/prev feed hotkeys

This commit is contained in:
Andrew Dolgov
2013-01-20 12:11:36 +04:00
parent 7d8f56571b
commit 4aa5bd593c
2 changed files with 68 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
<?php
// TODO: digest should register digest specific hotkey actions within tt-rss
class Digest extends Plugin implements IHandler {
private $link;
@@ -90,13 +91,19 @@ class Digest extends Plugin implements IHandler {
function digestinit() {
$tmp_feeds = api_get_feeds($this->link, -4, true, false, 0);
$params = array();
$feeds = array();
foreach ($tmp_feeds as $f) {
if ($f['id'] > 0 || $f['id'] == -4) array_push($feeds, $f);
}
print json_encode(array("feeds" => $feeds));
if ($_REQUEST["init"] == 1) {
$params["hotkeys"] = get_hotkeys_map($link);
}
$params["feeds"] = $feeds;
print json_encode($params);
}
}