Merge pull request #2118 from mattermost/release-1.12
Merge Release 1.12
This commit is contained in:
commit
5c0e4acf2a
8 changed files with 51 additions and 40 deletions
|
|
@ -113,7 +113,7 @@ android {
|
|||
applicationId "com.mattermost.rnbeta"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 26
|
||||
versionCode 139
|
||||
versionCode 140
|
||||
versionName "1.12.0"
|
||||
multiDexEnabled = true
|
||||
ndk {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export function makeDirectChannel(otherUserId, switchToChannel = true) {
|
|||
|
||||
dispatch(toggleDMChannel(otherUserId, 'true', channel.id));
|
||||
} else {
|
||||
result = await createDirectChannel(currentUserId, otherUserId)(dispatch, getState);
|
||||
result = await dispatch(createDirectChannel(currentUserId, otherUserId));
|
||||
channel = result.data;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,15 +56,15 @@ export default class ChannelsList extends PureComponent {
|
|||
}
|
||||
|
||||
onSelectChannel = (channel, currentChannelId) => {
|
||||
if (this.refs.search_bar) {
|
||||
this.refs.search_bar.cancel();
|
||||
}
|
||||
|
||||
if (channel.fake) {
|
||||
this.props.onJoinChannel(channel, currentChannelId);
|
||||
} else {
|
||||
this.props.onSelectChannel(channel, currentChannelId);
|
||||
}
|
||||
|
||||
if (this.refs.search_bar) {
|
||||
this.refs.search_bar.cancel();
|
||||
}
|
||||
};
|
||||
|
||||
onSearch = (term) => {
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ export default class ChannelSidebar extends Component {
|
|||
}
|
||||
};
|
||||
|
||||
selectChannel = (channel, currentChannelId) => {
|
||||
selectChannel = (channel, currentChannelId, closeDrawer = true) => {
|
||||
const {
|
||||
actions,
|
||||
} = this.props;
|
||||
|
|
@ -176,7 +176,10 @@ export default class ChannelSidebar extends Component {
|
|||
|
||||
tracker.channelSwitch = Date.now();
|
||||
|
||||
this.closeChannelDrawer();
|
||||
if (closeDrawer) {
|
||||
this.closeChannelDrawer();
|
||||
setChannelLoading(channel.id !== currentChannelId);
|
||||
}
|
||||
|
||||
if (!channel) {
|
||||
const utils = require('app/utils/general');
|
||||
|
|
@ -189,15 +192,15 @@ export default class ChannelSidebar extends Component {
|
|||
const erroMessage = {};
|
||||
|
||||
utils.alertErrorWithFallback(intl, erroMessage, unableToJoinMessage);
|
||||
setChannelLoading(false);
|
||||
return;
|
||||
}
|
||||
|
||||
setChannelLoading(channel.id !== currentChannelId);
|
||||
setChannelDisplayName(channel.display_name);
|
||||
EventEmitter.emit('switch_channel', channel, currentChannelId);
|
||||
};
|
||||
|
||||
joinChannel = async (channel, currentChannelId) => {
|
||||
joinChannel = (channel, currentChannelId) => {
|
||||
const {intl} = this.context;
|
||||
const {
|
||||
actions,
|
||||
|
|
@ -210,37 +213,45 @@ export default class ChannelSidebar extends Component {
|
|||
makeDirectChannel,
|
||||
} = actions;
|
||||
|
||||
const displayValue = {displayName: channel.display_name};
|
||||
const utils = require('app/utils/general');
|
||||
this.closeChannelDrawer();
|
||||
actions.setChannelLoading(channel.id !== currentChannelId);
|
||||
|
||||
let result;
|
||||
if (channel.type === General.DM_CHANNEL) {
|
||||
result = await makeDirectChannel(channel.id, false);
|
||||
setTimeout(async () => {
|
||||
const displayValue = {displayName: channel.display_name};
|
||||
const utils = require('app/utils/general');
|
||||
|
||||
if (result.error) {
|
||||
const dmFailedMessage = {
|
||||
id: 'mobile.open_dm.error',
|
||||
defaultMessage: "We couldn't open a direct message with {displayName}. Please check your connection and try again.",
|
||||
};
|
||||
utils.alertErrorWithFallback(intl, result.error, dmFailedMessage, displayValue);
|
||||
let result;
|
||||
if (channel.type === General.DM_CHANNEL) {
|
||||
result = await makeDirectChannel(channel.id, false);
|
||||
|
||||
if (result.error) {
|
||||
const dmFailedMessage = {
|
||||
id: 'mobile.open_dm.error',
|
||||
defaultMessage: "We couldn't open a direct message with {displayName}. Please check your connection and try again.",
|
||||
};
|
||||
utils.alertErrorWithFallback(intl, result.error, dmFailedMessage, displayValue);
|
||||
}
|
||||
} else {
|
||||
result = await joinChannel(currentUserId, currentTeamId, channel.id);
|
||||
|
||||
if (result.error || !result.data || !result.data.channel) {
|
||||
const joinFailedMessage = {
|
||||
id: 'mobile.join_channel.error',
|
||||
defaultMessage: "We couldn't join the channel {displayName}. Please check your connection and try again.",
|
||||
};
|
||||
utils.alertErrorWithFallback(intl, result.error, joinFailedMessage, displayValue);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = await joinChannel(currentUserId, currentTeamId, channel.id);
|
||||
|
||||
if (result.error || !result.data || !result.data.channel) {
|
||||
const joinFailedMessage = {
|
||||
id: 'mobile.join_channel.error',
|
||||
defaultMessage: "We couldn't join the channel {displayName}. Please check your connection and try again.",
|
||||
};
|
||||
utils.alertErrorWithFallback(intl, result.error, joinFailedMessage, displayValue);
|
||||
if (result.error || (!result.data && !result.data.channel)) {
|
||||
actions.setChannelLoading(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (result.error) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.selectChannel(result.data.channel || result.data, currentChannelId);
|
||||
requestAnimationFrame(() => {
|
||||
this.selectChannel(result.data.channel || result.data, currentChannelId, false);
|
||||
});
|
||||
}, 200);
|
||||
};
|
||||
|
||||
onPageSelected = (index) => {
|
||||
|
|
|
|||
|
|
@ -2427,7 +2427,7 @@
|
|||
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 139;
|
||||
CURRENT_PROJECT_VERSION = 140;
|
||||
DEAD_CODE_STRIPPING = NO;
|
||||
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
|
||||
ENABLE_BITCODE = NO;
|
||||
|
|
@ -2476,7 +2476,7 @@
|
|||
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 139;
|
||||
CURRENT_PROJECT_VERSION = 140;
|
||||
DEAD_CODE_STRIPPING = NO;
|
||||
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
|
||||
ENABLE_BITCODE = NO;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>139</string>
|
||||
<string>140</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.12.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>139</string>
|
||||
<string>140</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@
|
|||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>139</string>
|
||||
<string>140</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
Loading…
Reference in a new issue