Merge branch 'release-1.5'

This commit is contained in:
Elias Nahum 2017-12-07 13:55:25 -03:00
commit 29b8e2c727
No known key found for this signature in database
GPG key ID: E038DB71E0B61702
11 changed files with 40 additions and 26 deletions

View file

@ -106,7 +106,7 @@ android {
applicationId "com.mattermost.rnbeta"
minSdkVersion 21
targetSdkVersion 23
versionCode 71
versionCode 72
versionName "1.5.0"
multiDexEnabled true
ndk {

View file

@ -56,8 +56,10 @@ public class CustomPushNotification extends PushNotification {
if (notificationId != -1) {
channelIdToNotificationCount.remove(channelId);
channelIdToNotification.remove(channelId);
final NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancel(notificationId);
if (context != null) {
final NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancel(notificationId);
}
}
}

View file

@ -24,7 +24,7 @@ function mapStateToProps(state, ownProps) {
const currentDraft = ownProps.rootId ? getThreadDraft(state, ownProps.rootId) : getCurrentChannelDraft(state);
return {
channelId: getCurrentChannelId(state),
channelId: ownProps.channelId || getCurrentChannelId(state),
canUploadFiles: canUploadFilesOnMobile(state),
channelIsLoading: state.views.channel.loading,
currentUserId: getCurrentUserId(state),

View file

@ -10,6 +10,7 @@ import {
Alert,
AppState,
InteractionManager,
Keyboard,
NativeModules,
Platform
} from 'react-native';
@ -194,6 +195,7 @@ export default class Mattermost {
}
} else if (isActive) {
this.inBackgroundSince = null;
Keyboard.dismiss();
}
} catch (error) {
// do nothing

View file

@ -9,7 +9,7 @@ import {
InteractionManager
} from 'react-native';
import {RequestStatus} from 'mattermost-redux/constants';
import {General, RequestStatus} from 'mattermost-redux/constants';
import EventEmitter from 'mattermost-redux/utils/event_emitter';
import EditChannelInfo from 'app/components/edit_channel_info';
@ -199,23 +199,27 @@ export default class EditChannel extends PureComponent {
onUpdateChannel = () => {
Keyboard.dismiss();
const {displayName, channelURL, purpose, header} = this.state;
const {channel: {id}} = this.props;
const {channel: {id, type}} = this.props;
const isDirect = type === General.DM_CHANNEL || type === General.GM_CHANNEL;
const channel = {
display_name: displayName,
display_name: isDirect ? '' : displayName,
name: channelURL,
purpose,
header
};
let result = this.validateDisplayName(displayName.trim());
if (result.error) {
this.setState({error: result.error});
return;
}
result = this.validateChannelURL(channelURL.trim());
if (result.error) {
this.setState({error: result.error});
return;
if (!isDirect) {
let result = this.validateDisplayName(displayName.trim());
if (result.error) {
this.setState({error: result.error});
return;
}
result = this.validateChannelURL(channelURL.trim());
if (result.error) {
this.setState({error: result.error});
return;
}
}
this.props.actions.patchChannel(id, channel);

View file

@ -255,6 +255,10 @@ export default class Previewer extends Component {
};
const opacity = isInFetchCache ? 1 : this.state.opacity;
const containerStyle = Platform.select({
android: {height: imageHeight, width: this.state.imageWidth, backgroundColor: '#000'},
ios: {flex: 1, backgroundColor: '#000'}
});
return (
<View
@ -262,7 +266,7 @@ export default class Previewer extends Component {
onResponderRelease={this.handleResponderRelease}
style={[style.fileImageWrapper, {height: '100%', width: '100%'}]}
>
<AnimatedView style={{flex: 1, backgroundColor: '#000', opacity}}>
<AnimatedView style={[containerStyle, {opacity}]}>
<ImageView
ref={this.attachImageView}
source={source}

View file

@ -131,6 +131,7 @@ class Login extends PureComponent {
blur = () => {
this.loginId.blur();
this.passwd.blur();
Keyboard.dismiss();
};
preSignIn = wrapWithPreventDoubleTap(() => {
@ -341,6 +342,7 @@ class Login extends PureComponent {
ref={this.scrollRef}
style={style.container}
contentContainerStyle={style.innerContainer}
keyboardShouldPersistTaps='handled'
>
<Image
source={logo}

View file

@ -49,11 +49,11 @@ class UserProfile extends PureComponent {
close = () => {
const {navigator} = this.props;
if (Platform.OS === 'ios') {
navigator.popToRoot({
animated: true
});
} else {
navigator.popToRoot({
animated: true
});
if (Platform.OS === 'android') {
navigator.dismissModal({
animationType: 'slide-down'
});

View file

@ -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 = 71;
CURRENT_PROJECT_VERSION = 72;
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 = 71;
CURRENT_PROJECT_VERSION = 72;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;

View file

@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>71</string>
<string>72</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>

View file

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