Page 1 of 1

Show unread article count before feed/category title

Posted: 21 Mar 2013, 05:01
by HunterZ
It would be nice to have the option of displaying unread article counts for feeds and/or categories on the left side of the feed/category names, instead of on the right side. This would allow users to slide the vertical divider between the feed list and feed content panes farther to the left without sacrificing the ability to see the unread counts.

If anyone familiar with the tt-rss code has any hints about where to look and doesn't think it would be too difficult, I would be willing to try hacking at the code to see if I can come up with a patch myself.

Re: Show unread article count before feed/category title

Posted: 21 Mar 2013, 07:37
by HunterZ
Actually, I figured it out myself. In js/FeedTree.js, change the following in your tt-rss install:

Code: Select all

   if (item.unread > 0) {
      label = name + " (" + item.unread + ")";
   } else {
      label = name;
   }


to:

Code: Select all

   if (item.unread > 0) {
      label = "(" + item.unread + ") " + name;
   } else {
      label = name;
   }


and then reload tt-rss in your browser.

Re: Show unread article count before feed/category title

Posted: 21 Mar 2013, 07:59
by craywolf
I did exactly the same thing, but with the page title. Would be nice to have this as an option, just to save from re-patching this on the next upgrade, but that's up to fox.

Changed the favicon too, just to keep it distinct from the TT-RSS forum tabs. I set it to the Google Reader icon just because it's familiar, but I like the TT-RSS Android app's icon, might try and set it to that.

Re: Show unread article count before feed/category title

Posted: 21 Mar 2013, 08:24
by fox
>I set it to the Google Reader

Maybe we should make that an option too.

Re: Show unread article count before feed/category title

Posted: 21 Mar 2013, 08:48
by craywolf
fox wrote:>I set it to the Google Reader

Maybe we should make that an option too.


Heh, I'm sure you're sick of people bringing it up, but it's just an icon that was familiar to me and distinct from the forums. I'd rather set it to the Android app's icon, but I was doing this at work and it would have taken more than a wget to nab a copy of that one.

Re: Show unread article count before feed/category title

Posted: 21 Mar 2013, 08:53
by fox
I don't think android icon would work well in 16x16 px, it's a bit too detailed for that.

Re: Show unread article count before feed/category title

Posted: 21 Mar 2013, 18:15
by HunterZ
I would just take the existing logo and replace the bluish square behind the "t" with an RSS icon of the same bluish color (or the traditional orange).

Also, thanks guys for derailing my thread that was meant to be helpful into something that annoyed fox :(

Re: Show unread article count before feed/category title

Posted: 21 Mar 2013, 18:37
by craywolf
HunterZ wrote:Also, thanks guys for derailing my thread that was meant to be helpful into something that annoyed fox :(


Sorry :(. But hey, you did get your unread counts moved at least. And if you turn it into a .patch file it should be easy to re-apply after upgrades, as long as that little section of code stays mostly the same. The beauty of open source, right there.

And for what it's worth, I think the icon turned out better than expected. I did replace the gradient with a solid color though, it didn't look right at this size otherwise.

Re: Show unread article count before feed/category title

Posted: 21 Mar 2013, 19:03
by fox
Yeah actually that looks pretty cool. I'm stealing that (back). :)

Edit: I'll also add a 72px hires icon for stuff like chrome application shortcuts and whatnot.

Re: Show unread article count before feed/category title

Posted: 21 Mar 2013, 20:07
by Rundfunk
The favicon from the mobile application looks good! Hope to see it in the next version of TT-RSS :)