Merge branch 'release-1.9'

This commit is contained in:
Elias Nahum 2018-06-08 18:12:25 -04:00
commit c66e8f49b6
No known key found for this signature in database
GPG key ID: E038DB71E0B61702
14 changed files with 92 additions and 47 deletions

View file

@ -113,7 +113,7 @@ android {
applicationId "com.mattermost.rnbeta"
minSdkVersion 21
targetSdkVersion 23
versionCode 107
versionCode 108
versionName "1.9.0"
ndk {
abiFilters "armeabi-v7a", "x86"

View file

@ -2,6 +2,7 @@ import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
import {
Animated,
Platform,
Text,
} from 'react-native';
@ -94,7 +95,14 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => {
paddingLeft: 10,
paddingTop: 3,
fontSize: 11,
marginBottom: 5,
...Platform.select({
android: {
marginBottom: 5,
},
ios: {
marginBottom: 2,
},
}),
color: theme.centerChannelColor,
backgroundColor: 'transparent',
},

View file

@ -70,11 +70,6 @@ export default class SearchBarAndroid extends PureComponent {
isFocused: false,
};
}
componentWillReceiveProps(nextProps) {
if (this.state.value !== nextProps.value) {
this.setState({value: nextProps.value});
}
}
cancel = () => {
this.onCancelButtonPress();
@ -153,10 +148,12 @@ export default class SearchBarAndroid extends PureComponent {
} = this.props;
const {isFocused} = this.state;
const inputNoBackground = {
...inputStyle,
};
Reflect.deleteProperty(inputNoBackground, 'backgroundColor');
const {
backgroundColor: bgColor, //eslint-disable-line no-unused-vars
...otherStyles
} = inputStyle;
const inputNoBackground = otherStyles;
let inputColor = styles.searchBarInput.backgroundColor;
if (inputStyle) {

View file

@ -227,7 +227,7 @@ export default class Entry extends PureComponent {
navigator: this.props.navigator,
};
return wrapWithContextProvider(ChannelScreen, true)(props);
return wrapWithContextProvider(ChannelScreen, false)(props);
};
render() {

View file

@ -92,8 +92,28 @@ export default class Notification extends PureComponent {
return icon;
};
getNotificationTitle = (titleText) => {
getNotificationTitle = (notification) => {
const {channel} = this.props;
const {message, data} = notification;
if (data.version === 'v2') {
if (data.channel_name) {
return (
<Text
numberOfLines={1}
ellipsizeMode='tail'
style={style.title}
>
{data.channel_name}
</Text>
);
}
return null;
}
const msg = message.split(':');
const titleText = msg.shift();
let title = (
<Text
@ -165,14 +185,20 @@ export default class Notification extends PureComponent {
render() {
const {deviceWidth, notification} = this.props;
const {message} = notification;
const {data, message} = notification;
if (message) {
const msg = message.split(':');
const titleText = msg.shift();
const messageText = msg.join('').trim();
let messageText;
if (data.version !== 'v2') {
const msg = message.split(':');
messageText = msg.join('').trim();
} else if (Platform.OS === 'ios') {
messageText = message.body || message;
} else {
messageText = message;
}
const title = this.getNotificationTitle(titleText);
const title = this.getNotificationTitle(notification);
const icon = this.getNotificationIcon();
return (

View file

@ -370,6 +370,9 @@ export default class Permalink extends PureComponent {
</Text>
</View>
</View>
<View style={style.dividerContainer}>
<View style={style.divider}/>
</View>
<View style={[style.postList, error ? style.bottom : null]}>
{postList}
</View>
@ -407,8 +410,6 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => {
header: {
alignItems: 'center',
backgroundColor: theme.centerChannelBg,
borderBottomColor: changeOpacity(theme.centerChannelColor, 0.2),
borderBottomWidth: 1,
borderTopLeftRadius: 6,
borderTopRightRadius: 6,
flexDirection: 'row',
@ -416,6 +417,13 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => {
paddingRight: 16,
width: '100%',
},
dividerContainer: {
backgroundColor: theme.centerChannelBg,
},
divider: {
backgroundColor: changeOpacity(theme.centerChannelColor, 0.2),
height: 1,
},
close: {
justifyContent: 'center',
height: 44,

View file

@ -38,9 +38,14 @@ const channelSetTransform = [
'channelsInTeam',
];
const rolesSetTransform = [
'pending',
];
const setTransforms = [
...usersSetTransform,
...channelSetTransform,
...rolesSetTransform,
];
export default function configureAppStore(initialState) {

View file

@ -2516,7 +2516,7 @@
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 107;
CURRENT_PROJECT_VERSION = 108;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;
@ -2566,7 +2566,7 @@
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 107;
CURRENT_PROJECT_VERSION = 108;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;

View file

@ -34,7 +34,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>107</string>
<string>108</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>

View file

@ -23,7 +23,7 @@
<key>CFBundleShortVersionString</key>
<string>1.9.0</string>
<key>CFBundleVersion</key>
<string>107</string>
<string>108</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>

View file

@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>107</string>
<string>108</string>
</dict>
</plist>

8
package-lock.json generated
View file

@ -9878,8 +9878,8 @@
}
},
"mattermost-redux": {
"version": "github:mattermost/mattermost-redux#2ef52763c82ca1ad338e5a4dc3dc557a0ecfd528",
"from": "github:mattermost/mattermost-redux#2ef52763c82ca1ad338e5a4dc3dc557a0ecfd528",
"version": "github:mattermost/mattermost-redux#b81b6c647b226554cb0d410578562e5f876f4d9b",
"from": "github:mattermost/mattermost-redux#b81b6c647b226554cb0d410578562e5f876f4d9b",
"requires": {
"deep-equal": "1.0.1",
"eslint-plugin-header": "1.2.0",
@ -14427,8 +14427,8 @@
}
},
"react-native-device-info": {
"version": "github:enahum/react-native-device-info#27ecfd4a59341bf6ed71d11203d914067070e8df",
"from": "react-native-device-info@github:enahum/react-native-device-info#27ecfd4a59341bf6ed71d11203d914067070e8df"
"version": "github:enahum/react-native-device-info#a7bb3cff1086780b2c791a3e43e5b826fdf3ab11",
"from": "github:enahum/react-native-device-info#a7bb3cff1086780b2c791a3e43e5b826fdf3ab11"
},
"react-native-dismiss-keyboard": {
"version": "1.0.0",

View file

@ -15,7 +15,7 @@
"intl": "1.2.5",
"jail-monkey": "1.0.0",
"jsc-android": "216113.0.3",
"mattermost-redux": "github:mattermost/mattermost-redux#2ef52763c82ca1ad338e5a4dc3dc557a0ecfd528",
"mattermost-redux": "github:mattermost/mattermost-redux#b81b6c647b226554cb0d410578562e5f876f4d9b",
"mime-db": "1.33.0",
"prop-types": "15.6.1",
"react": "16.3.2",
@ -26,7 +26,7 @@
"react-native-button": "2.3.0",
"react-native-circular-progress": "0.2.0",
"react-native-cookies": "3.2.0",
"react-native-device-info": "enahum/react-native-device-info.git#27ecfd4a59341bf6ed71d11203d914067070e8df",
"react-native-device-info": "enahum/react-native-device-info.git#a7bb3cff1086780b2c791a3e43e5b826fdf3ab11",
"react-native-doc-viewer": "2.7.8",
"react-native-document-picker": "2.1.0",
"react-native-drawer": "2.5.0",

View file

@ -129,21 +129,23 @@ export default class ExtensionTeam extends PureComponent {
}
return (
<SectionList
sections={sections}
ListHeaderComponent={this.renderSearchBar(styles)}
ItemSeparatorComponent={this.renderItemSeparator}
renderItem={this.renderItem}
renderSectionHeader={this.renderSectionHeader}
keyExtractor={this.keyExtractor}
keyboardShouldPersistTaps='always'
keyboardDismissMode='on-drag'
initialNumToRender={10}
maxToRenderPerBatch={10}
stickySectionHeadersEnabled={true}
scrollEventThrottle={100}
windowSize={5}
/>
<View>
{this.renderSearchBar(styles)}
<SectionList
sections={sections}
ItemSeparatorComponent={this.renderItemSeparator}
renderItem={this.renderItem}
renderSectionHeader={this.renderSectionHeader}
keyExtractor={this.keyExtractor}
keyboardShouldPersistTaps='always'
keyboardDismissMode='on-drag'
initialNumToRender={10}
maxToRenderPerBatch={10}
stickySectionHeadersEnabled={true}
scrollEventThrottle={100}
windowSize={5}
/>
</View>
);
};
@ -188,7 +190,6 @@ export default class ExtensionTeam extends PureComponent {
titleCancelColor={defaultTheme.centerChannelColor}
onChangeText={this.handleSearch}
autoCapitalize='none'
value={this.state.term}
/>
</View>
);