From 6179c031cda8c3378d1007b51c91a515c4ab8260 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Mon, 4 Jun 2018 08:54:59 -0400 Subject: [PATCH] Fix long post detection (#1713) --- app/components/channel_loader/channel_loader.js | 3 +-- app/components/post_body/post_body.js | 2 +- package-lock.json | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/components/channel_loader/channel_loader.js b/app/components/channel_loader/channel_loader.js index c0bd58432..05abe1268 100644 --- a/app/components/channel_loader/channel_loader.js +++ b/app/components/channel_loader/channel_loader.js @@ -49,7 +49,7 @@ export default class ChannelLoader extends PureComponent { const bg = this.props.backgroundColor || theme.centerChannelBg; return ( - + {Array(6).fill().map((item, index) => this.buildSections({ key: index, style, @@ -64,7 +64,6 @@ export default class ChannelLoader extends PureComponent { const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { - backgroundColor: theme.centerChannelBg, flex: 1, ...Platform.select({ android: { diff --git a/app/components/post_body/post_body.js b/app/components/post_body/post_body.js index e953f1ee6..11bd6e9b2 100644 --- a/app/components/post_body/post_body.js +++ b/app/components/post_body/post_body.js @@ -191,7 +191,7 @@ export default class PostBody extends PureComponent { const {height: deviceHeight} = Dimensions.get('window'); const {showLongPost} = this.props; - if (!showLongPost && height >= 1000) { + if (!showLongPost && height >= (deviceHeight * 1.2)) { this.setState({ isLongPost: true, maxHeight: (deviceHeight * 0.6), diff --git a/package-lock.json b/package-lock.json index 5f0762e50..91f3ee773 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15496,7 +15496,7 @@ }, "rn-placeholder": { "version": "github:enahum/rn-placeholder#4b065f892d7a7f9d921a969f2e72e609ebc0a212", - "from": "github:enahum/rn-placeholder", + "from": "github:enahum/rn-placeholder#4b065f892d7a7f9d921a969f2e72e609ebc0a212", "requires": { "prop-types": "^15.5.10" }