medic / cht-core

The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
https://communityhealthtoolkit.org
GNU Affero General Public License v3.0
439 stars 211 forks source link

Pagination: Apparent off-by-one error, primarily affecting desktop mode #1625

Closed ghost closed 8 years ago

ghost commented 8 years ago

Pagination appears to be working again, but scrolling to the pagination boundary results in a duplicate item (see screenshot). This technically happens in both mobile and desktop mode, but the effects aren't easily visible in mobile mode due to the right-pane transition.

I suspect this is an off-by-one issue in the pagination seek/offset code, but haven't confirmed this. Could be worked around for the field test if necessary, IMO.

screen shot 2015-11-19 at 4 52 58 pm

Observed on lg.app, version 0.6.0-alpha.2381, with Chromium 30 on Windows.

garethbowen commented 8 years ago

This is probably because we remove the current user's place. This means we get 50 items but only 49 are shown. Then we get items 49-99 so number 49 is shown twice.