mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 09:25:57 +00:00
clip max displayed counter value to 9999 because of container node width
This commit is contained in:
@@ -140,7 +140,7 @@ class Pref_Feeds extends Handler_Protected {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach (array(-4, -3, -1, -2, 0, -6) as $i) {
|
foreach (array(-4, -3, -1, -2, 0, -6) as $i) {
|
||||||
array_push($cat['items'], $this->feedlist_init_feed($i));
|
array_push($cat['items'], $this->feedlist_init_feed($i, false, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Plugin feeds for -1 */
|
/* Plugin feeds for -1 */
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
/* global __, App, Headlines, xhr, dojo, dijit, fox, PluginHost, Notify, fox */
|
/* global __, App, Headlines, xhr, dojo, dijit, fox, PluginHost, Notify, fox */
|
||||||
|
|
||||||
const Feeds = {
|
const Feeds = {
|
||||||
|
_max_counter_value: 9999,
|
||||||
_default_feed_id: -3,
|
_default_feed_id: -3,
|
||||||
counters_last_request: 0,
|
counters_last_request: 0,
|
||||||
_active_feed_id: undefined,
|
_active_feed_id: undefined,
|
||||||
@@ -69,7 +70,7 @@ const Feeds = {
|
|||||||
|
|
||||||
const id = elems[l].id;
|
const id = elems[l].id;
|
||||||
const kind = elems[l].kind;
|
const kind = elems[l].kind;
|
||||||
const ctr = parseInt(elems[l].counter);
|
const ctr = Math.min(this._max_counter_value, parseInt(elems[l].counter));
|
||||||
const error = elems[l].error;
|
const error = elems[l].error;
|
||||||
const has_img = elems[l].has_img;
|
const has_img = elems[l].has_img;
|
||||||
const updated = elems[l].updated;
|
const updated = elems[l].updated;
|
||||||
@@ -90,8 +91,10 @@ const Feeds = {
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
this.setUnread(id, (kind == "cat"), ctr);
|
this.setUnread(id, (kind == "cat"), ctr);
|
||||||
this.setValue(id, (kind == "cat"), 'auxcounter', parseInt(elems[l].auxcounter));
|
this.setValue(id, (kind == "cat"), 'auxcounter',
|
||||||
this.setValue(id, (kind == "cat"), 'markedcounter', parseInt(elems[l].markedcounter));
|
Math.min(this._max_counter_value, parseInt(elems[l].auxcounter)));
|
||||||
|
this.setValue(id, (kind == "cat"), 'markedcounter',
|
||||||
|
Math.min(this._max_counter_value, parseInt(elems[l].markedcounter)));
|
||||||
|
|
||||||
if (kind != "cat") {
|
if (kind != "cat") {
|
||||||
this.setValue(id, false, 'error', error);
|
this.setValue(id, false, 'error', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user