From b0638eccde79a79b0d237cce8a3df3495258537e Mon Sep 17 00:00:00 2001 From: CHEN Jiajie Date: Mon, 18 Sep 2017 12:03:20 +0800 Subject: [PATCH] v3.2.2 released - bug fixed and added a waning when using advancedRefreshView on Android --- Example/package.json | 2 +- Example/yarn.lock | 6 +++--- README.md | 2 +- package.json | 2 +- src/refreshableScrollView.android.js | 5 ++++- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Example/package.json b/Example/package.json index 103e3b6..17b4f3d 100644 --- a/Example/package.json +++ b/Example/package.json @@ -10,7 +10,7 @@ "native-base": "^2.3.1", "react": "16.0.0-alpha.12", "react-native": "0.46.1", - "react-native-ultimate-listview": "^3.2.0" + "react-native-ultimate-listview": "^3.2.2" }, "devDependencies": { "babel-jest": "20.0.3", diff --git a/Example/yarn.lock b/Example/yarn.lock index f1a8773..3448325 100644 --- a/Example/yarn.lock +++ b/Example/yarn.lock @@ -3153,9 +3153,9 @@ react-native-easy-grid@0.1.15: prop-types "^15.5.10" react-timer-mixin "^0.13.3" -react-native-ultimate-listview@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/react-native-ultimate-listview/-/react-native-ultimate-listview-3.2.0.tgz#6c613af97da5fac03fc5350088431033f1eb3d38" +react-native-ultimate-listview@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/react-native-ultimate-listview/-/react-native-ultimate-listview-3.2.2.tgz#682f13db53bcd4c6856b112d6a526a71e1b0fae6" react-native-vector-icons@~4.1.1: version "4.1.1" diff --git a/README.md b/README.md index 6d9e27e..de01512 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This is an **enhanced FlatList** with all excellent extra features, comparing to **Quick installation** - If on react-native < 0.43: `yarn add react-native-ultimate-listview@3.0.2` -- If on react-native >= 0.43 `yarn add react-native-ultimate-listview@3.2.0` +- If on react-native >= 0.43 `yarn add react-native-ultimate-listview@latest` diff --git a/package.json b/package.json index 19ca6b6..33f0a06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-ultimate-listview", - "version": "3.2.1", + "version": "3.2.2", "description": "A high performance FlatList providing customised pull-to-refresh | auto-pagination & infinite-scrolling | gridview layout | swipeable-row. The truly ultimate version that I have done the most tricky part for you, just simply follow the instructions shown below to put it in your app.", "main": "index.js", "scripts": { diff --git a/src/refreshableScrollView.android.js b/src/refreshableScrollView.android.js index 4c39a0f..e4e0d6d 100644 --- a/src/refreshableScrollView.android.js +++ b/src/refreshableScrollView.android.js @@ -43,6 +43,7 @@ export default class RefreshableScrollView extends ScrollView { } componentDidMount() { + console.warn('The advancedRefreshView is not ready for Android at this moment. \n\nIf the items are less than the height of device screen, the refreshView will not disappear. \n\nPlease consider setting the refreshableMode={Platform.OS === "ios" ? "advanced" : "basic"}, or feel free to send me a PR to resolve this problem. \n\nThanks a lot.'); AsyncStorage.getItem(DATE_KEY, (error, result) => { if (result) { result = parseInt(result); @@ -160,7 +161,9 @@ export default class RefreshableScrollView extends ScrollView { showRefreshHeader: true, }); setTimeout(() => { - this.refs.scrollView.scrollTo({x: 0, y: this.props.refreshViewHeight, animated: true}); + if (this.refs.scrollView.scrollTo) { + this.refs.scrollView.scrollTo({x: 0, y: this.props.refreshViewHeight, animated: true}); + } this.setState({ refreshStatus: RefreshStatus.pullToRefresh, refreshTitle: this.props.refreshableTitlePull,