Merge branch 'release-1.8'

This commit is contained in:
Elias Nahum 2018-04-27 08:53:40 -03:00
commit a97c4d3bdd
No known key found for this signature in database
GPG key ID: E038DB71E0B61702
13 changed files with 21 additions and 13 deletions

View file

@ -111,7 +111,7 @@ android {
applicationId "com.mattermost.rnbeta"
minSdkVersion 21
targetSdkVersion 23
versionCode 98
versionCode 99
versionName "1.8.0"
multiDexEnabled true
ndk {

View file

@ -57,7 +57,8 @@
android:name="com.reactnativenavigation.controllers.NavigationActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"/>
<activity
android:noHistory="false"
android:noHistory="true"
android:excludeFromRecents="true"
android:name="com.mattermost.share.ShareActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/app_name"

View file

@ -60,6 +60,7 @@ export default class Post extends PureComponent {
canDelete: PropTypes.bool.isRequired,
onPermalinkPress: PropTypes.func,
shouldRenderReplyButton: PropTypes.bool,
showAddReaction: PropTypes.bool,
showFullDate: PropTypes.bool,
showLongPost: PropTypes.bool,
theme: PropTypes.object.isRequired,
@ -70,6 +71,7 @@ export default class Post extends PureComponent {
static defaultProps = {
isSearchResult: false,
showAddReaction: true,
showLongPost: false,
channelIsReadOnly: false,
};
@ -386,6 +388,7 @@ export default class Post extends PureComponent {
post,
renderReplies,
shouldRenderReplyButton,
showAddReaction,
showFullDate,
showLongPost,
theme,
@ -461,6 +464,7 @@ export default class Post extends PureComponent {
managedConfig={managedConfig}
isFlagged={isFlagged}
isReplyPost={isReplyPost}
showAddReaction={showAddReaction}
showLongPost={showLongPost}
/>
</View>

View file

@ -35,6 +35,7 @@ export default class PostBody extends PureComponent {
flagPost: PropTypes.func.isRequired,
unflagPost: PropTypes.func.isRequired,
}).isRequired,
canAddReaction: PropTypes.bool,
canDelete: PropTypes.bool,
canEdit: PropTypes.bool,
channelIsReadOnly: PropTypes.bool.isRequired,
@ -54,7 +55,6 @@ export default class PostBody extends PureComponent {
managedConfig: PropTypes.object,
message: PropTypes.string,
navigator: PropTypes.object.isRequired,
canAddReaction: PropTypes.bool,
onAddReaction: PropTypes.func,
onCopyPermalink: PropTypes.func,
onCopyText: PropTypes.func,
@ -66,6 +66,7 @@ export default class PostBody extends PureComponent {
postId: PropTypes.string.isRequired,
postProps: PropTypes.object,
renderReplyBar: PropTypes.func,
showAddReaction: PropTypes.bool,
showLongPost: PropTypes.bool.isRequired,
theme: PropTypes.object,
toggleSelected: PropTypes.func,
@ -128,13 +129,14 @@ export default class PostBody extends PureComponent {
onCopyText,
onPostDelete,
onPostEdit,
showAddReaction,
} = this.props;
const actions = [];
const isPendingOrFailedPost = isPending || isFailed;
// we should check for the user roles and permissions
if (!isPendingOrFailedPost && !isSystemMessage && !isPostEphemeral) {
if (canAddReaction && !channelIsReadOnly) {
if (showAddReaction && canAddReaction && !channelIsReadOnly) {
actions.push({
text: formatMessage({id: 'mobile.post_info.add_reaction', defaultMessage: 'Add Reaction'}),
onPress: this.props.onAddReaction,

View file

@ -9,7 +9,7 @@ import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
export default class ChannelDisplayName extends PureComponent {
static propTypes = {
displayName: PropTypes.string.isRequired,
displayName: PropTypes.string,
theme: PropTypes.object.isRequired,
};

View file

@ -16,7 +16,7 @@ function makeMapStateToProps() {
const channel = getChannel(state, {id: post.channel_id});
return {
displayName: channel.display_name,
displayName: channel ? channel.display_name : '',
theme: getTheme(state),
};
};

View file

@ -40,6 +40,7 @@ export default class SearchResultPost extends PureComponent {
postId={this.props.postId}
{...postComponentProps}
isSearchResult={true}
showAddReaction={false}
showFullDate={this.props.showFullDate}
navigator={this.props.navigator}
/>

View file

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

View file

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

View file

@ -23,7 +23,7 @@
<key>CFBundleShortVersionString</key>
<string>1.8.0</string>
<key>CFBundleVersion</key>
<string>98</string>
<string>99</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>

View file

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

2
package-lock.json generated
View file

@ -2763,7 +2763,7 @@
"integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag=="
},
"commonmark": {
"version": "github:mattermost/commonmark.js#c9c29834005af6eedd1a979d913b75e34f16a83b",
"version": "github:mattermost/commonmark.js#21742b9d51070b6abba82d88590a0c51ee552a47",
"requires": {
"entities": "1.1.1",
"mdurl": "1.0.1",

View file

@ -10,7 +10,7 @@
"analytics-react-native": "1.2.0",
"babel-polyfill": "6.26.0",
"base-64": "0.1.0",
"commonmark": "github:mattermost/commonmark.js#c9c29834005af6eedd1a979d913b75e34f16a83b",
"commonmark": "github:mattermost/commonmark.js#21742b9d51070b6abba82d88590a0c51ee552a47",
"commonmark-react-renderer": "mattermost/commonmark-react-renderer#86fa63f898802953842526c2030f3b63c5d1ae7a",
"deep-equal": "1.0.1",
"fuse.js": "^3.2.0",