mirror of https://github.com/zulip/zulip.git
Add explanatory comment
Leo and I were looking over this code and I couldn't remember what it was doing. So after I re-derived its purpose, we figured that an explanatory comment was in order. (imported from commit ce984362e2b504b40f3d3586777bd73691ad5ea7)
This commit is contained in:
parent
673f497a6f
commit
3f0fa363f9
|
@ -218,6 +218,11 @@ MessageList.prototype = {
|
||||||
|
|
||||||
if (closest === items.length
|
if (closest === items.length
|
||||||
|| (closest !== 0
|
|| (closest !== 0
|
||||||
|
// We have the index at which a message with the
|
||||||
|
// given id would be inserted, but that isn't
|
||||||
|
// necessarily the index of the message that has an
|
||||||
|
// id that is closest to the query; it could be the
|
||||||
|
// previous message in the list.
|
||||||
&& (id - items[closest - 1].id <
|
&& (id - items[closest - 1].id <
|
||||||
items[closest].id - id)))
|
items[closest].id - id)))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue