Skip to content

Commit

Permalink
Merge pull request #33 from viezel/master
Browse files Browse the repository at this point in the history
Support for TiCollectionView
  • Loading branch information
FokkeZB committed Feb 12, 2015
2 parents 68009b4 + cb22600 commit ff84bed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -116,7 +116,9 @@ You can also manually trigger the loading state of the widget. You could use thi
There is a test app and instructions in the [test](https://github.com/FokkeZB/nl.fokkezb.infiniteScroll/tree/test) branch.

## Changelog
* 1.4.2:
* 1.4.4:
* Added support for [TiCollectionView](https://github.com/mpociot/TiCollectionView).
* 1.4.3:
* Closes #30 so you can call `.mark()` to re-init the position tracking.
* 1.4.2:
* Fixes #29 for Alloy 1.5.0
Expand Down
4 changes: 2 additions & 2 deletions controllers/widget.js
Expand Up @@ -13,7 +13,7 @@ var loading = false,
parentSymbol = null;

// Only before Alloy 1.3.0 and in some cases since Alloy 1.5.0
if (__parentSymbol && (__parentSymbol.apiName === 'Ti.UI.TableView' || __parentSymbol.apiName === 'Ti.UI.ListView')) {
if (__parentSymbol && (__parentSymbol.apiName === 'Ti.UI.TableView' || __parentSymbol.apiName === 'Ti.UI.ListView' || __parentSymbol.apiName === 'de.marcelpociot.CollectionView')) {
init(__parentSymbol);
} else {
console.debug('[' + $.__widgetId + '] Do not forget to call init() passing a TableView or ListView');
Expand All @@ -27,7 +27,7 @@ function init(parent) {
}

// Override __parentSymbol (needed after Alloy 1.3.0)
if (parent.apiName !== 'Ti.UI.TableView' && parent.apiName !== 'Ti.UI.ListView') {
if (parent.apiName !== 'Ti.UI.TableView' && parent.apiName !== 'Ti.UI.ListView' && parent.apiName !== 'de.marcelpociot.CollectionView') {
console.error('[' + $.__widgetId + '] Please call init() passing TableView or ListView');
return;
}
Expand Down
2 changes: 1 addition & 1 deletion widget.json
Expand Up @@ -3,7 +3,7 @@
"name": "Infinite Scroll for TableView and ListView",
"description" : "Scroll down to the end of the TableView or ListView to load more.",
"author": "Fokke Zandbergen",
"version": "1.4.3",
"version": "1.4.4",
"copyright":"Copyright (c) 2014",
"license":"Apache License, Version 2.0",
"min-alloy-version": "1.0",
Expand Down

0 comments on commit ff84bed

Please sign in to comment.