Skip to content

Commit

Permalink
Fixed scroll-load-state loop with fast syncs
Browse files Browse the repository at this point in the history
  • Loading branch information
FokkeZB committed Oct 7, 2013
1 parent 0afdeb3 commit 491743b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The widget automatically shows an *ActivityIndicator* in a *TableView*'s *Footer

```javascript
"dependencies": {
"nl.fokkezb.infiniteScroll":"1.3"
"nl.fokkezb.infiniteScroll":"1.3.1"
}
```

Expand Down Expand Up @@ -96,6 +96,8 @@ You can also manually trigger the loading state of the widget. You could use thi
| dettach | | Manually set the `DONE` state and remove the scroll listener

## Changelog
* 1.3.1:
* Fixes scroll-load-state loop with fast syncs.
* 1.3:
* Compatible with iOS7's new `Ti.UI.Window.extendEdges` via `#isCenter`.
* Allows you to hide the text until first load by calling `show` after that
Expand Down
5 changes: 4 additions & 1 deletion controllers/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ function state(_state, _message) {
$.isCenter.add($.isText);
$.isText.show(); // so it can be hidden on init via TSS

loading = false;
// small time-out to prevent scroll-load-state loop with fast syncs
setTimeout(function () {
loading = false;
}, 25);

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion widget.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "nl.fokkezb.infiniteScroll",
"description" : "Scroll down to the end of the TableView to load more.",
"author": "Fokke Zandbergen",
"version": "1.3",
"version": "1.3.1",
"copyright":"Copyright (c) 2013",
"license":"Apache License, Version 2.0",
"min-alloy-version": "1.0",
Expand Down

0 comments on commit 491743b

Please sign in to comment.