Merge branch 'release-1.8'
This commit is contained in:
commit
36631d9560
8 changed files with 32 additions and 73 deletions
|
|
@ -111,7 +111,7 @@ android {
|
|||
applicationId "com.mattermost.rnbeta"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 23
|
||||
versionCode 97
|
||||
versionCode 98
|
||||
versionName "1.8.0"
|
||||
multiDexEnabled true
|
||||
ndk {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import {Client4} from 'mattermost-redux/client';
|
|||
|
||||
import UserStatus from 'app/components/user_status';
|
||||
import ImageCacheManager from 'app/utils/image_cache_manager';
|
||||
import {emptyFunction} from 'app/utils/general';
|
||||
import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
|
||||
|
||||
import placeholder from 'assets/images/profile.jpg';
|
||||
|
|
@ -63,27 +64,25 @@ export default class ProfilePicture extends PureComponent {
|
|||
}
|
||||
|
||||
componentWillUpdate(nextProps) {
|
||||
if (
|
||||
Boolean(nextProps.user) !== Boolean(this.props.user) ||
|
||||
nextProps.user.id !== this.props.user.id ||
|
||||
nextProps.user.last_picture_update !== this.props.user.last_picture_update
|
||||
) {
|
||||
this.setState({pictureUrl: null});
|
||||
if (this.mounted) {
|
||||
const url = this.state.pictureUrl;
|
||||
const nextUrl = nextProps.user ? Client4.getProfilePictureUrl(nextProps.user.id, nextProps.user.last_picture_update) : null;
|
||||
|
||||
const nextUser = nextProps.user;
|
||||
if (url !== nextUrl) {
|
||||
this.setState({
|
||||
pictureUrl: nextUrl,
|
||||
});
|
||||
|
||||
if (this.mounted) {
|
||||
this.setState({pictureUrl: null});
|
||||
if (nextUrl) {
|
||||
// empty function is so that promise unhandled is not triggered in dev mode
|
||||
ImageCacheManager.cache('', nextUrl, this.setImageUrl).then(emptyFunction).catch(emptyFunction);
|
||||
}
|
||||
}
|
||||
|
||||
if (nextUser) {
|
||||
ImageCacheManager.cache('', Client4.getProfilePictureUrl(nextUser.id, nextUser.last_picture_update), this.setImageURL);
|
||||
if (nextProps.edit && nextProps.imageUri !== this.props.imageUri) {
|
||||
this.setImageURL(nextProps.imageUri);
|
||||
}
|
||||
}
|
||||
|
||||
if (nextProps.edit && nextProps.imageUri !== this.props.imageUri) {
|
||||
this.setImageURL(nextProps.imageUri);
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import {
|
|||
ScrollView,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TextInput,
|
||||
View,
|
||||
} from 'react-native';
|
||||
|
||||
|
|
@ -50,27 +49,6 @@ export default class Code extends React.PureComponent {
|
|||
lineNumbersStyle = style.lineNumbers;
|
||||
}
|
||||
|
||||
let textComponent;
|
||||
if (Platform.OS === 'ios') {
|
||||
textComponent = (
|
||||
<TextInput
|
||||
editable={false}
|
||||
multiline={true}
|
||||
value={this.props.content}
|
||||
style={[style.codeText]}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
textComponent = (
|
||||
<Text
|
||||
selectable={true}
|
||||
style={style.codeText}
|
||||
>
|
||||
{this.props.content}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<ScrollView
|
||||
style={style.scrollContainer}
|
||||
|
|
@ -86,7 +64,12 @@ export default class Code extends React.PureComponent {
|
|||
contentContainerStyle={style.code}
|
||||
horizontal={true}
|
||||
>
|
||||
{textComponent}
|
||||
<Text
|
||||
selectable={true}
|
||||
style={style.codeText}
|
||||
>
|
||||
{this.props.content}
|
||||
</Text>
|
||||
</ScrollView>
|
||||
</ScrollView>
|
||||
);
|
||||
|
|
@ -131,9 +114,6 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => {
|
|||
android: {
|
||||
paddingVertical: 4,
|
||||
},
|
||||
ios: {
|
||||
top: -4,
|
||||
},
|
||||
}),
|
||||
},
|
||||
codeText: {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import {
|
|||
ScrollView,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TextInput,
|
||||
View,
|
||||
} from 'react-native';
|
||||
|
||||
|
|
@ -50,27 +49,6 @@ export default class TextPreview extends React.PureComponent {
|
|||
lineNumbersStyle = style.lineNumbers;
|
||||
}
|
||||
|
||||
let textComponent;
|
||||
if (Platform.OS === 'ios') {
|
||||
textComponent = (
|
||||
<TextInput
|
||||
editable={false}
|
||||
multiline={true}
|
||||
value={this.props.content}
|
||||
style={[style.codeText]}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
textComponent = (
|
||||
<Text
|
||||
selectable={true}
|
||||
style={style.codeText}
|
||||
>
|
||||
{this.props.content}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<ScrollView
|
||||
style={style.scrollContainer}
|
||||
|
|
@ -86,7 +64,12 @@ export default class TextPreview extends React.PureComponent {
|
|||
horizontal={true}
|
||||
contentContainerStyle={style.code}
|
||||
>
|
||||
{textComponent}
|
||||
<Text
|
||||
selectable={true}
|
||||
style={style.codeText}
|
||||
>
|
||||
{this.props.content}
|
||||
</Text>
|
||||
</ScrollView>
|
||||
</ScrollView>
|
||||
);
|
||||
|
|
@ -132,9 +115,6 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => {
|
|||
android: {
|
||||
paddingVertical: 4,
|
||||
},
|
||||
ios: {
|
||||
top: -4,
|
||||
},
|
||||
}),
|
||||
},
|
||||
codeText: {
|
||||
|
|
|
|||
|
|
@ -2468,7 +2468,7 @@
|
|||
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 97;
|
||||
CURRENT_PROJECT_VERSION = 98;
|
||||
DEAD_CODE_STRIPPING = NO;
|
||||
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
|
||||
ENABLE_BITCODE = NO;
|
||||
|
|
@ -2517,7 +2517,7 @@
|
|||
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 97;
|
||||
CURRENT_PROJECT_VERSION = 98;
|
||||
DEAD_CODE_STRIPPING = NO;
|
||||
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
|
||||
ENABLE_BITCODE = NO;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>97</string>
|
||||
<string>98</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.8.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>97</string>
|
||||
<string>98</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@
|
|||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>97</string>
|
||||
<string>98</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
Loading…
Reference in a new issue