From a5ed41a696d774a058545dbed45579079a071c9e Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Wed, 6 Dec 2017 11:38:57 -0500 Subject: [PATCH 1/5] Added ScrollViews to all settings pages (1.5) (#1270) * Added ScrollViews to all settings pages * Added alwaysBounceVertical to settings pages --- .../settings/advanced_settings/advanced_settings.js | 9 ++++++--- app/screens/settings/general/settings.js | 9 ++++++--- .../notification_settings/notification_settings.js | 9 ++++++--- .../notification_settings_email.js | 1 + .../notification_settings_mentions.ios.js | 1 + .../notification_settings_mentions_keywords.js | 10 ++++++---- .../notification_settings_mobile.android.js | 1 + .../notification_settings_mobile.ios.js | 1 + 8 files changed, 28 insertions(+), 13 deletions(-) diff --git a/app/screens/settings/advanced_settings/advanced_settings.js b/app/screens/settings/advanced_settings/advanced_settings.js index 0dfa77e2a..92c291ee7 100644 --- a/app/screens/settings/advanced_settings/advanced_settings.js +++ b/app/screens/settings/advanced_settings/advanced_settings.js @@ -8,6 +8,7 @@ import { ActivityIndicator, Alert, Platform, + ScrollView, Text, View } from 'react-native'; @@ -120,7 +121,10 @@ class AdvancedSettings extends PureComponent { return ( - + - + ); } @@ -159,7 +163,6 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { }, wrapper: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), - flex: 1, ...Platform.select({ ios: { paddingTop: 35 diff --git a/app/screens/settings/general/settings.js b/app/screens/settings/general/settings.js index f9d8ba322..ee41d0804 100644 --- a/app/screens/settings/general/settings.js +++ b/app/screens/settings/general/settings.js @@ -8,6 +8,7 @@ import { InteractionManager, Linking, Platform, + ScrollView, View } from 'react-native'; import DeviceInfo from 'react-native-device-info'; @@ -214,7 +215,10 @@ class Settings extends PureComponent { return ( - + - + ); } @@ -315,7 +319,6 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { }, wrapper: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), - flex: 1, ...Platform.select({ ios: { paddingTop: 35 diff --git a/app/screens/settings/notification_settings/notification_settings.js b/app/screens/settings/notification_settings/notification_settings.js index 9b2bdcf02..3eba4d71c 100644 --- a/app/screens/settings/notification_settings/notification_settings.js +++ b/app/screens/settings/notification_settings/notification_settings.js @@ -8,6 +8,7 @@ import { Alert, Modal, Platform, + ScrollView, TouchableOpacity, View } from 'react-native'; @@ -341,7 +342,10 @@ class NotificationSettings extends PureComponent { return ( - + - + {this.renderEmailNotificationSettings(style)} ); @@ -389,7 +393,6 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { }, wrapper: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), - flex: 1, ...Platform.select({ ios: { paddingTop: 35 diff --git a/app/screens/settings/notification_settings_email/notification_settings_email.js b/app/screens/settings/notification_settings_email/notification_settings_email.js index e0477ccb3..9738578e1 100644 --- a/app/screens/settings/notification_settings_email/notification_settings_email.js +++ b/app/screens/settings/notification_settings_email/notification_settings_email.js @@ -212,6 +212,7 @@ export default class NotificationSettingsEmail extends PureComponent { {this.renderEmailSection()} diff --git a/app/screens/settings/notification_settings_mentions/notification_settings_mentions.ios.js b/app/screens/settings/notification_settings_mentions/notification_settings_mentions.ios.js index 05f2c2304..ae0abacf6 100644 --- a/app/screens/settings/notification_settings_mentions/notification_settings_mentions.ios.js +++ b/app/screens/settings/notification_settings_mentions/notification_settings_mentions.ios.js @@ -199,6 +199,7 @@ class NotificationSettingsMentionsIos extends NotificationSettingsMentionsBase { {this.renderMentionSection(style)} {this.renderReplySection(style)} diff --git a/app/screens/settings/notification_settings_mentions_keywords/notification_settings_mentions_keywords.js b/app/screens/settings/notification_settings_mentions_keywords/notification_settings_mentions_keywords.js index 4fd190d89..e6e30a633 100644 --- a/app/screens/settings/notification_settings_mentions_keywords/notification_settings_mentions_keywords.js +++ b/app/screens/settings/notification_settings_mentions_keywords/notification_settings_mentions_keywords.js @@ -2,7 +2,7 @@ // See License.txt for license information. import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; -import {View} from 'react-native'; +import {ScrollView, View} from 'react-native'; import FormattedText from 'app/components/formatted_text'; import StatusBar from 'app/components/status_bar'; @@ -68,7 +68,10 @@ export default class NotificationSettingsMentionsKeywords extends PureComponent return ( - + - + ); } @@ -106,7 +109,6 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { backgroundColor: theme.centerChannelBg }, wrapper: { - flex: 1, backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), paddingTop: 35 }, diff --git a/app/screens/settings/notification_settings_mobile/notification_settings_mobile.android.js b/app/screens/settings/notification_settings_mobile/notification_settings_mobile.android.js index df1a2c7fd..ff578157d 100644 --- a/app/screens/settings/notification_settings_mobile/notification_settings_mobile.android.js +++ b/app/screens/settings/notification_settings_mobile/notification_settings_mobile.android.js @@ -639,6 +639,7 @@ class NotificationSettingsMobileAndroid extends NotificationSettingsMobileBase { {this.renderMobilePushSection()} diff --git a/app/screens/settings/notification_settings_mobile/notification_settings_mobile.ios.js b/app/screens/settings/notification_settings_mobile/notification_settings_mobile.ios.js index 0f1390fe2..47e834e3d 100644 --- a/app/screens/settings/notification_settings_mobile/notification_settings_mobile.ios.js +++ b/app/screens/settings/notification_settings_mobile/notification_settings_mobile.ios.js @@ -153,6 +153,7 @@ class NotificationSettingsMobileIos extends NotificationSettingsMobileBase { {this.renderMobilePushSection(style)} {this.renderMobilePushStatusSection(style)} From 8e7fedbcc89c836e51fb027c3fd64e8d268b25ce Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Wed, 6 Dec 2017 11:39:25 -0500 Subject: [PATCH 2/5] Fixed at mentions appearing for non-existant users (#1271) --- app/components/at_mention/at_mention.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/at_mention/at_mention.js b/app/components/at_mention/at_mention.js index 8ac5fb234..0c83363c0 100644 --- a/app/components/at_mention/at_mention.js +++ b/app/components/at_mention/at_mention.js @@ -71,7 +71,7 @@ export default class AtMention extends React.PureComponent { let mentionName = props.mentionName; while (mentionName.length > 0) { - if (props.usersByUsername[mentionName]) { + if (props.usersByUsername.hasOwnProperty(mentionName)) { const user = props.usersByUsername[mentionName]; return { username: user.username, From d73f85ab0025589a0d3925c2558200d6a7deac0c Mon Sep 17 00:00:00 2001 From: enahum Date: Wed, 6 Dec 2017 15:10:13 -0300 Subject: [PATCH 3/5] Android: Fix load more messages (#1266) --- .../load_more_posts/load_more_posts.js | 24 +++++++++++-------- app/components/post_list/post_list.js | 3 ++- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/app/components/post_list/load_more_posts/load_more_posts.js b/app/components/post_list/load_more_posts/load_more_posts.js index 47b669c0b..e5f3038bc 100644 --- a/app/components/post_list/load_more_posts/load_more_posts.js +++ b/app/components/post_list/load_more_posts/load_more_posts.js @@ -4,6 +4,7 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import { + ActivityIndicator, TouchableOpacity, View, ViewPropTypes @@ -30,20 +31,23 @@ export default class LoadMorePosts extends PureComponent { }; renderText(style) { - let i18nId = 'posts_view.loadMore'; - let defaultMessage = 'Load more messages'; - if (this.props.loading) { - i18nId = 'mobile.loading_posts'; - defaultMessage = 'Loading messages...'; + const i18nId = 'mobile.loading_posts'; + const defaultMessage = 'Loading messages...'; + + return ( + + ); } return ( - + + + ); } diff --git a/app/components/post_list/post_list.js b/app/components/post_list/post_list.js index 9f34bafad..59c887b51 100644 --- a/app/components/post_list/post_list.js +++ b/app/components/post_list/post_list.js @@ -5,6 +5,7 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import { InteractionManager, + Platform, StyleSheet, FlatList } from 'react-native'; @@ -238,7 +239,7 @@ export default class PostList extends PureComponent { keyExtractor={this.keyExtractor} ListFooterComponent={this.renderFooter} onEndReached={loadMore} - onEndReachedThreshold={0} + onEndReachedThreshold={Platform.OS === 'ios' ? 0 : 1} {...refreshControl} renderItem={this.renderItem} contentContainerStyle={styles.postListContent} From 004f09f7e0960d5ce78578a1968446c9185fbe9e Mon Sep 17 00:00:00 2001 From: enahum Date: Wed, 6 Dec 2017 16:28:48 -0300 Subject: [PATCH 4/5] IOS Version Bump to 71 (#1272) --- ios/Mattermost.xcodeproj/project.pbxproj | 4 ++-- ios/Mattermost/Info.plist | 2 +- ios/MattermostTests/Info.plist | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/Mattermost.xcodeproj/project.pbxproj b/ios/Mattermost.xcodeproj/project.pbxproj index b72a2d8f4..df453b053 100644 --- a/ios/Mattermost.xcodeproj/project.pbxproj +++ b/ios/Mattermost.xcodeproj/project.pbxproj @@ -2113,7 +2113,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 70; + CURRENT_PROJECT_VERSION = 71; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = UQ8HT4Q2XM; ENABLE_BITCODE = NO; @@ -2163,7 +2163,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 70; + CURRENT_PROJECT_VERSION = 71; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = UQ8HT4Q2XM; ENABLE_BITCODE = NO; diff --git a/ios/Mattermost/Info.plist b/ios/Mattermost/Info.plist index f932f4106..46de1a08a 100644 --- a/ios/Mattermost/Info.plist +++ b/ios/Mattermost/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 70 + 71 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS diff --git a/ios/MattermostTests/Info.plist b/ios/MattermostTests/Info.plist index e0c74c187..db54c2247 100644 --- a/ios/MattermostTests/Info.plist +++ b/ios/MattermostTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 70 + 71 From 6e3e03bf185d24f3ec95498cae0baf7687aa8cbf Mon Sep 17 00:00:00 2001 From: enahum Date: Wed, 6 Dec 2017 16:38:09 -0300 Subject: [PATCH 5/5] Version Bump to 71 (#1273) --- android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 02b0bae66..680234c68 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,7 +106,7 @@ android { applicationId "com.mattermost.rnbeta" minSdkVersion 21 targetSdkVersion 23 - versionCode 70 + versionCode 71 versionName "1.5.0" multiDexEnabled true ndk {