From 2aa709f7ef51c0922e9729f1b4ab70413b5a4e60 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 30 Dec 2009 09:57:48 +0300 Subject: [PATCH] mobile: code cleanup; show archived feed; reinstate feedlist icons --- mobile/classic/functions.php | 71 ++++++++---------------------------- mobile/classic/mobile.css | 6 +-- 2 files changed, 18 insertions(+), 59 deletions(-) diff --git a/mobile/classic/functions.php b/mobile/classic/functions.php index 823af122..e7d14da6 100644 --- a/mobile/classic/functions.php +++ b/mobile/classic/functions.php @@ -1,5 +1,4 @@ "; @@ -125,12 +93,8 @@ $class = "label"; - if ($count > 0) { - $class .= "Unread"; - } - printMobileFeedEntry(-$line["id"]-11, - $class, $line["caption"], $count, "../images/label.png", $link); + $class, $line["caption"], $count, false, $link); } @@ -225,12 +189,6 @@ $class = "feed"; } - if ($unread > 0) $class .= "Unread"; - - if ($actid == $feed_id) { - $class .= "Selected"; - } - if ($category != $tmp_category && get_pref($link, 'ENABLE_FEED_CATS')) { if ($category) { @@ -280,7 +238,7 @@ } printMobileFeedEntry($feed_id, $class, $feed, $unread, - "../icons/$feed_id.ico", $link, $rtl_content); + false, $link, $rtl_content); ++$lnum; } @@ -305,10 +263,6 @@ $class = "tag"; - if ($unread > 0) { - $class .= "Unread"; - } - printMobileFeedEntry($tag, $class, $tag, $unread, "../images/tag.png", $link); @@ -321,6 +275,13 @@ function printMobileFeedEntry($feed_id, $class, $feed_title, $unread, $icon_file, $link, $rtl_content = false) { + if (!$feed_title) $feed_title = getFeedTitle($link, $feed_id, false); + if (!$unread) $unread = getFeedUnread($link, $feed_id); + + if ($unread > 0) $class .= "Unread"; + + if (!$icon_file) $icon_file = "../../" . getFeedIcon($feed_id); + if (file_exists($icon_file) && filesize($icon_file) > 0) { $feed_icon = ""; } else { @@ -336,9 +297,9 @@ $feed = "$feed_title"; print "
  • "; -# if (get_pref($link, 'ENABLE_FEED_ICONS')) { -# print "$feed_icon"; -# } + if (get_pref($link, 'ENABLE_FEED_ICONS')) { + print "$feed_icon"; + } print "$feed "; diff --git a/mobile/classic/mobile.css b/mobile/classic/mobile.css index 6ba79052..786639ef 100644 --- a/mobile/classic/mobile.css +++ b/mobile/classic/mobile.css @@ -27,14 +27,12 @@ h3 { #heading { font-size : small; -/* border-width : 0px 0px 1px 0px; + border-width : 0px 0px 1px 0px; border-style : solid; - border-color : #88b0ff; - background : #ecf4ff; */ + border-color : #f0f0f0; color : #88b0ff; font-weight : bold; - margin-bottom : 10px; } #content {