mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 20:51:50 +08:00
FIX: never ask for less than 5 notifications
This commit is contained in:
parent
1f31435a7b
commit
b3d6cefef4
|
@ -46,6 +46,9 @@ export default Ember.Component.extend({
|
|||
|
||||
// estimate (poorly) the amount of notifications to return
|
||||
const limit = Math.round(($(window).height() - headerHeight()) / 50);
|
||||
// we REALLY don't want to be asking for negative counts of notifications
|
||||
// less than 5 is also not that useful
|
||||
if (limit < 5) { limit = 5; }
|
||||
|
||||
// TODO: It's a bit odd to use the store in a component, but this one really
|
||||
// wants to reach out and grab notifications
|
||||
|
|
Loading…
Reference in New Issue
Block a user