Skip to content

Commit

Permalink
Merge pull request #690 from shoutem/release/4.9.2
Browse files Browse the repository at this point in the history
Release/4.9.2 - master
  • Loading branch information
tomislav-arambasic authored Mar 2, 2022
2 parents 04142f3 + ecb82c9 commit 1b34508
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 17 deletions.
3 changes: 3 additions & 0 deletions components/Icon/assets/camera.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions components/Icon/assets/comments.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions components/Icon/assets/gallery.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions components/Icon/assets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import back from './back.svg';
import books from './books.svg';
import call from './call.svg';
import camSwitch from './cam-switch.svg';
import camera from './camera.svg';
import cart from './cart.svg';
import checkboxOff from './checkbox-off.svg';
import checkboxOn from './checkbox-on.svg';
Expand All @@ -18,6 +19,7 @@ import checkboxRectangleOn from './checkbox-rectangle-on.svg';
import clearText from './clear-text.svg';
import close from './close.svg';
import comment from './comment.svg';
import comments from './comments.svg';
import deals from './deals.svg';
import directions from './directions.svg';
import downArrow from './down-arrow.svg';
Expand All @@ -34,6 +36,7 @@ import facebook from './facebook.svg';
import facebookLogo from './facebook-logo.svg';
import folder from './folder.svg';
import friends from './friends.svg';
import gallery from './gallery.svg';
import gift from './gift.svg';
import github from './github.svg';
import hangUp from './hang-up.svg';
Expand All @@ -43,6 +46,7 @@ import instagram from './instagram.svg';
import laptop from './laptop.svg';
import leftArrow from './left-arrow.svg';
import like from './like.svg';
import likeHeart from './like-heart.svg';
import link from './link.svg';
import linkedin from './linkedin.svg';
import lock from './lock.svg';
Expand Down Expand Up @@ -109,6 +113,7 @@ export const defaultConfig = [
{ name: 'back', icon: back },
{ name: 'books', icon: books },
{ name: 'call', icon: call },
{ name: 'camera', icon: camera },
{ name: 'camSwitch', icon: camSwitch },
{ name: 'cart', icon: cart },
{ name: 'checkbox-off', icon: checkboxOff },
Expand All @@ -118,6 +123,7 @@ export const defaultConfig = [
{ name: 'clear-text', icon: clearText },
{ name: 'close', icon: close },
{ name: 'comment', icon: comment },
{ name: 'comments', icon: comments },
{ name: 'deals', icon: deals },
{ name: 'directions', icon: directions },
{ name: 'down-arrow', icon: downArrow },
Expand All @@ -133,6 +139,7 @@ export const defaultConfig = [
{ name: 'facebook', icon: facebook },
{ name: 'facebook-logo', icon: facebookLogo },
{ name: 'folder', icon: folder },
{ name: 'gallery', icon: gallery },
{ name: 'friends', icon: friends },
{ name: 'gift', icon: gift },
{ name: 'github', icon: github },
Expand All @@ -143,6 +150,7 @@ export const defaultConfig = [
{ name: 'laptop', icon: laptop },
{ name: 'left-arrow', icon: leftArrow },
{ name: 'like', icon: like },
{ name: 'like-heart', icon: likeHeart },
{ name: 'link', icon: link },
{ name: 'linkedin', icon: linkedin },
{ name: 'lock', icon: lock },
Expand Down
4 changes: 4 additions & 0 deletions components/Icon/assets/like-heart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 2 additions & 15 deletions components/ListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ class ListView extends PureComponent {

this.state = {
status: props.loading ? Status.LOADING : Status.IDLE,
isScrolling: false,
};
}

Expand Down Expand Up @@ -177,21 +176,17 @@ class ListView extends PureComponent {
// reference
mappedProps.ref = this.handleListViewRef;

mappedProps.onMomentumScrollBegin = this.setStartedScrolling;

mappedProps.onMomentumScrollEnd = this.setEndedScrolling;

return mappedProps;
}

// eslint-disable-next-line consistent-return
createOnLoadMore() {
const { onLoadMore, data } = this.props;
const { isScrolling, status } = this.state;
const { status } = this.state;
if (onLoadMore) {
return _.throttle(
() => {
if (!_.isEmpty(data) && isScrolling && status === Status.IDLE) {
if (!_.isEmpty(data) && status === Status.IDLE) {
onLoadMore();
}
},
Expand All @@ -201,14 +196,6 @@ class ListView extends PureComponent {
}
}

setStartedScrolling() {
this.setState({ isScrolling: true });
}

setEndedScrolling() {
this.setState({ isScrolling: true });
}

autoHideHeader({
nativeEvent: {
layout: { height },
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shoutem/ui",
"version": "4.9.1",
"version": "4.9.2",
"description": "Styleable set of components for React Native applications",
"scripts": {
"lint": "eslint .",
Expand Down

0 comments on commit 1b34508

Please sign in to comment.