diff --git a/android/app/build.gradle b/android/app/build.gradle index 7578c5b85..3175692cf 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -113,7 +113,7 @@ android { applicationId "com.mattermost.rnbeta" minSdkVersion 21 targetSdkVersion 23 - versionCode 129 + versionCode 130 versionName "1.11.0" ndk { abiFilters "armeabi-v7a", "x86" diff --git a/app/actions/views/login.js b/app/actions/views/login.js index 1386617b8..8579c66b1 100644 --- a/app/actions/views/login.js +++ b/app/actions/views/login.js @@ -3,10 +3,11 @@ import {getDataRetentionPolicy} from 'mattermost-redux/actions/general'; import {GeneralTypes} from 'mattermost-redux/action_types'; +import {getSessions} from 'mattermost-redux/actions/users'; import {autoUpdateTimezone} from 'mattermost-redux/actions/timezone'; import {Client4} from 'mattermost-redux/client'; import {getConfig, getLicense} from 'mattermost-redux/selectors/entities/general'; -import {getCurrentUserId, getSessions} from 'mattermost-redux/selectors/entities/users'; +import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users'; import {ViewTypes} from 'app/constants'; import {app} from 'app/mattermost'; @@ -70,26 +71,25 @@ export function getSession() { return async (dispatch, getState) => { const state = getState(); const {currentUserId} = state.entities.users; - const {credentials} = state.entities.general; - const token = credentials && credentials.token; + const {deviceToken} = state.entities.general; - if (!currentUserId || !token) { + if (!currentUserId || !deviceToken) { return 0; } let sessions; try { - sessions = await getSessions(currentUserId); + sessions = await dispatch(getSessions(currentUserId)); } catch (e) { console.warn('Failed to get current session', e); // eslint-disable-line no-console return 0; } - if (!Array.isArray(sessions)) { + if (!Array.isArray(sessions.data)) { return 0; } - const session = sessions.find((s) => s.token === token); + const session = sessions.data.find((s) => s.device_id === deviceToken); return session && session.expires_at ? session.expires_at : 0; }; diff --git a/app/components/formatted_time.js b/app/components/formatted_time.js index fb528e828..9afa96f6e 100644 --- a/app/components/formatted_time.js +++ b/app/components/formatted_time.js @@ -18,22 +18,41 @@ export default class FormattedTime extends React.PureComponent { intl: intlShape.isRequired, }; - render() { + getFormattedTime = () => { + const {intl} = this.context; + const { value, - children, timeZone, hour12, } = this.props; - const {intl} = this.context; - const timezoneProps = timeZone ? {timeZone} : {}; - const formattedTime = intl.formatDate(value, { - ...timezoneProps, - hour: 'numeric', - minute: 'numeric', - hour12, - }); + if (timeZone) { + return intl.formatDate(value, { + timeZone, + hour: 'numeric', + minute: 'numeric', + hour12, + }); + } + + // If no timezone is defined fallback to the previous implementation + const date = new Date(value); + const militaryTime = !hour12; + const hour = militaryTime ? date.getHours() : (date.getHours() % 12 || 12); + let minute = date.getMinutes(); + minute = minute >= 10 ? minute : ('0' + minute); + let time = ''; + if (!militaryTime) { + time = (date.getHours() >= 12 ? ' PM' : ' AM'); + } + + return hour + ':' + minute + time; + }; + + render() { + const {children} = this.props; + const formattedTime = this.getFormattedTime(); if (typeof children === 'function') { return children(formattedTime); diff --git a/app/components/loading_placeholder/__snapshots__/loading_placeholder.test.js.snap b/app/components/loading_placeholder/__snapshots__/loading_placeholder.test.js.snap deleted file mode 100644 index f387312c0..000000000 --- a/app/components/loading_placeholder/__snapshots__/loading_placeholder.test.js.snap +++ /dev/null @@ -1,153 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`LoadingPlaceholder should match snapshot 1`] = ` -ShallowWrapper { - "length": 1, - Symbol(enzyme.__root__): [Circular], - Symbol(enzyme.__unrendered__): , - Symbol(enzyme.__renderer__): Object { - "batchedUpdates": [Function], - "getNode": [Function], - "render": [Function], - "simulateEvent": [Function], - "unmount": [Function], - }, - Symbol(enzyme.__node__): Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "accessible": true, - "allowFontScaling": true, - "children": Array [ - , - , - ], - "ellipsizeMode": "tail", - }, - "ref": null, - "rendered": Array [ - Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "defaultMessage": "Loading", - "id": "loading_screen.loading", - }, - "ref": null, - "rendered": null, - "type": [Function], - }, - Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "animationDelay": 300, - "minOpacity": 0.4, - "numberOfDots": 3, - "style": Object { - "fontSize": 28, - "letterSpacing": -3, - "lineHeight": 30, - "marginLeft": 5, - }, - }, - "ref": null, - "rendered": null, - "type": [Function], - }, - ], - "type": [Function], - }, - Symbol(enzyme.__nodes__): Array [ - Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "accessible": true, - "allowFontScaling": true, - "children": Array [ - , - , - ], - "ellipsizeMode": "tail", - }, - "ref": null, - "rendered": Array [ - Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "defaultMessage": "Loading", - "id": "loading_screen.loading", - }, - "ref": null, - "rendered": null, - "type": [Function], - }, - Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "animationDelay": 300, - "minOpacity": 0.4, - "numberOfDots": 3, - "style": Object { - "fontSize": 28, - "letterSpacing": -3, - "lineHeight": 30, - "marginLeft": 5, - }, - }, - "ref": null, - "rendered": null, - "type": [Function], - }, - ], - "type": [Function], - }, - ], - Symbol(enzyme.__options__): Object { - "adapter": ReactSixteenAdapter { - "options": Object { - "enableComponentDidUpdateOnSetState": true, - }, - }, - }, -} -`; diff --git a/app/components/loading_placeholder/index.js b/app/components/loading_placeholder/index.js deleted file mode 100644 index e2dc72fb9..000000000 --- a/app/components/loading_placeholder/index.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -import React from 'react'; -import AnimatedEllipsis from 'react-native-animated-ellipsis'; -import FormattedText from 'app/components/formatted_text'; - -import {Text} from 'react-native'; - -const LoadingPlaceholder = () => ( - - - - -); - -export default LoadingPlaceholder; diff --git a/app/components/loading_placeholder/loading_placeholder.test.js b/app/components/loading_placeholder/loading_placeholder.test.js deleted file mode 100644 index 96293f111..000000000 --- a/app/components/loading_placeholder/loading_placeholder.test.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -import React from 'react'; -import {configure, shallow} from 'enzyme'; -import Adapter from 'enzyme-adapter-react-16'; -configure({adapter: new Adapter()}); - -import LoadingPlaceholder from './index.js'; - -describe('LoadingPlaceholder', () => { - test('should match snapshot', () => { - const wrapper = shallow( - - ); - - expect(wrapper).toMatchSnapshot(); - }); -}); diff --git a/app/components/post_body_additional_content/post_body_additional_content.js b/app/components/post_body_additional_content/post_body_additional_content.js index 3e4d95343..60c9968c3 100644 --- a/app/components/post_body_additional_content/post_body_additional_content.js +++ b/app/components/post_body_additional_content/post_body_additional_content.js @@ -4,6 +4,7 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import { + Alert, Image, Linking, Platform, @@ -13,6 +14,7 @@ import { View, } from 'react-native'; import {YouTubeStandaloneAndroid, YouTubeStandaloneIOS} from 'react-native-youtube'; +import {intlShape} from 'react-intl'; import ProgressiveImage from 'app/components/progressive_image'; @@ -53,6 +55,10 @@ export default class PostBodyAdditionalContent extends PureComponent { onLongPress: emptyFunction, }; + static contextTypes = { + intl: intlShape.isRequired, + }; + constructor(props) { super(props); @@ -348,7 +354,9 @@ export default class PostBodyAdditionalContent extends PureComponent { const startTime = this.getYouTubeTime(link); if (Platform.OS === 'ios') { - YouTubeStandaloneIOS.playVideo(videoId, startTime); + YouTubeStandaloneIOS. + playVideo(videoId, startTime). + catch(this.playYouTubeVideoError); } else { const {config} = this.props; @@ -358,13 +366,30 @@ export default class PostBodyAdditionalContent extends PureComponent { videoId, autoplay: true, startTime, - }); + }).catch(this.playYouTubeVideoError); } else { Linking.openURL(link); } } }; + playYouTubeVideoError = (errorMessage) => { + const {formatMessage} = this.context.intl; + + Alert.alert( + formatMessage({ + id: 'mobile.youtube_playback_error.title', + defaultMessage: 'YouTube playback error', + }), + formatMessage({ + id: 'mobile.youtube_playback_error.description', + defaultMessage: 'An error occurred while trying to play the YouTube video.\nDetails: {details}', + }, { + details: errorMessage, + }), + ); + }; + render() { const {link, openGraphData, postProps} = this.props; const {linkLoadError} = this.state; diff --git a/app/components/sidebars/main/channels_list/channel_item/__snapshots__/channel_item.test.js.snap b/app/components/sidebars/main/channels_list/channel_item/__snapshots__/channel_item.test.js.snap index cba55a39a..0fcd3bb59 100644 --- a/app/components/sidebars/main/channels_list/channel_item/__snapshots__/channel_item.test.js.snap +++ b/app/components/sidebars/main/channels_list/channel_item/__snapshots__/channel_item.test.js.snap @@ -121,9 +121,7 @@ ShallowWrapper { }, ] } - > - - + /> , @@ -202,9 +200,7 @@ ShallowWrapper { }, ] } - > - - + /> , "delayPressOut": 100, @@ -275,9 +271,7 @@ ShallowWrapper { }, ] } - > - - + /> , ], "style": Array [ @@ -340,9 +334,7 @@ ShallowWrapper { }, ] } - > - - , + />, undefined, ], "style": Array [ @@ -390,7 +382,7 @@ ShallowWrapper { "props": Object { "accessible": true, "allowFontScaling": true, - "children": , + "children": undefined, "ellipsizeMode": "tail", "numberOfLines": 1, "style": Array [ @@ -410,15 +402,7 @@ ShallowWrapper { ], }, "ref": null, - "rendered": Object { - "instance": null, - "key": undefined, - "nodeType": "function", - "props": Object {}, - "ref": null, - "rendered": null, - "type": [Function], - }, + "rendered": null, "type": [Function], }, undefined, @@ -512,9 +496,7 @@ ShallowWrapper { }, ] } - > - - + /> , @@ -593,9 +575,7 @@ ShallowWrapper { }, ] } - > - - + /> , "delayPressOut": 100, @@ -666,9 +646,7 @@ ShallowWrapper { }, ] } - > - - + /> , ], "style": Array [ @@ -731,9 +709,7 @@ ShallowWrapper { }, ] } - > - - , + />, undefined, ], "style": Array [ @@ -781,7 +757,7 @@ ShallowWrapper { "props": Object { "accessible": true, "allowFontScaling": true, - "children": , + "children": undefined, "ellipsizeMode": "tail", "numberOfLines": 1, "style": Array [ @@ -801,15 +777,7 @@ ShallowWrapper { ], }, "ref": null, - "rendered": Object { - "instance": null, - "key": undefined, - "nodeType": "function", - "props": Object {}, - "ref": null, - "rendered": null, - "type": [Function], - }, + "rendered": null, "type": [Function], }, undefined, @@ -850,854 +818,3 @@ ShallowWrapper { }, } `; - -exports[`ChannelItem should match snapshot for no displayName 1`] = ` -ShallowWrapper { - "length": 1, - Symbol(enzyme.__root__): [Circular], - Symbol(enzyme.__unrendered__): , - Symbol(enzyme.__renderer__): Object { - "batchedUpdates": [Function], - "getNode": [Function], - "render": [Function], - "simulateEvent": [Function], - "unmount": [Function], - }, - Symbol(enzyme.__node__): Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "children": - - - - - - - - - , - }, - "ref": [Function], - "rendered": Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "activeOpacity": 0.85, - "children": - - - - - - - , - "delayPressOut": 100, - "onLongPress": [Function], - "onPress": [Function], - "underlayColor": "rgba(170,170,170,0.5)", - }, - "ref": null, - "rendered": Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "children": Array [ - undefined, - - - - - - , - ], - "style": Array [ - Object { - "flex": 1, - "flexDirection": "row", - "height": 44, - }, - undefined, - ], - }, - "ref": null, - "rendered": Array [ - undefined, - Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "children": Array [ - , - - - , - undefined, - ], - "style": Array [ - Object { - "alignItems": "center", - "flex": 1, - "flexDirection": "row", - "paddingLeft": 16, - }, - undefined, - ], - }, - "ref": null, - "rendered": Array [ - Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "channelId": "channel_id", - "isActive": false, - "isArchived": false, - "isInfo": false, - "isUnread": true, - "membersCount": 1, - "size": 16, - "status": "online", - "teammateDeletedAt": 0, - "theme": Object { - "sidebarText": "#aaa", - "sidebarTextActiveBorder": "#aaa", - "sidebarTextActiveColor": "#aaa", - "sidebarTextHoverBg": "#aaa", - }, - "type": "O", - }, - "ref": null, - "rendered": null, - "type": [Function], - }, - Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "accessible": true, - "allowFontScaling": true, - "children": , - "ellipsizeMode": "tail", - "numberOfLines": 1, - "style": Array [ - Object { - "color": "rgba(170,170,170,0.4)", - "flex": 1, - "fontSize": 14, - "fontWeight": "600", - "height": "100%", - "lineHeight": 44, - "paddingRight": 40, - "textAlignVertical": "center", - }, - Object { - "color": undefined, - }, - ], - }, - "ref": null, - "rendered": Object { - "instance": null, - "key": undefined, - "nodeType": "function", - "props": Object {}, - "ref": null, - "rendered": null, - "type": [Function], - }, - "type": [Function], - }, - undefined, - ], - "type": [Function], - }, - ], - "type": [Function], - }, - "type": [Function], - }, - "type": [Function], - }, - Symbol(enzyme.__nodes__): Array [ - Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "children": - - - - - - - - - , - }, - "ref": [Function], - "rendered": Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "activeOpacity": 0.85, - "children": - - - - - - - , - "delayPressOut": 100, - "onLongPress": [Function], - "onPress": [Function], - "underlayColor": "rgba(170,170,170,0.5)", - }, - "ref": null, - "rendered": Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "children": Array [ - undefined, - - - - - - , - ], - "style": Array [ - Object { - "flex": 1, - "flexDirection": "row", - "height": 44, - }, - undefined, - ], - }, - "ref": null, - "rendered": Array [ - undefined, - Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "children": Array [ - , - - - , - undefined, - ], - "style": Array [ - Object { - "alignItems": "center", - "flex": 1, - "flexDirection": "row", - "paddingLeft": 16, - }, - undefined, - ], - }, - "ref": null, - "rendered": Array [ - Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "channelId": "channel_id", - "isActive": false, - "isArchived": false, - "isInfo": false, - "isUnread": true, - "membersCount": 1, - "size": 16, - "status": "online", - "teammateDeletedAt": 0, - "theme": Object { - "sidebarText": "#aaa", - "sidebarTextActiveBorder": "#aaa", - "sidebarTextActiveColor": "#aaa", - "sidebarTextHoverBg": "#aaa", - }, - "type": "O", - }, - "ref": null, - "rendered": null, - "type": [Function], - }, - Object { - "instance": null, - "key": undefined, - "nodeType": "class", - "props": Object { - "accessible": true, - "allowFontScaling": true, - "children": , - "ellipsizeMode": "tail", - "numberOfLines": 1, - "style": Array [ - Object { - "color": "rgba(170,170,170,0.4)", - "flex": 1, - "fontSize": 14, - "fontWeight": "600", - "height": "100%", - "lineHeight": 44, - "paddingRight": 40, - "textAlignVertical": "center", - }, - Object { - "color": undefined, - }, - ], - }, - "ref": null, - "rendered": Object { - "instance": null, - "key": undefined, - "nodeType": "function", - "props": Object {}, - "ref": null, - "rendered": null, - "type": [Function], - }, - "type": [Function], - }, - undefined, - ], - "type": [Function], - }, - ], - "type": [Function], - }, - "type": [Function], - }, - "type": [Function], - }, - ], - Symbol(enzyme.__options__): Object { - "adapter": ReactSixteenAdapter { - "options": Object { - "enableComponentDidUpdateOnSetState": true, - }, - }, - "context": Object { - "intl": Object { - "formatMessage": [MockFunction] { - "calls": Array [ - Array [ - Object { - "defaultMessage": "{displayName} (you)", - "id": "channel_header.directchannel.you", - }, - Object { - "displayname": "", - }, - ], - ], - }, - }, - }, - }, -} -`; diff --git a/app/components/sidebars/main/channels_list/channel_item/channel_item.js b/app/components/sidebars/main/channels_list/channel_item/channel_item.js index cce3eca36..64ca77380 100644 --- a/app/components/sidebars/main/channels_list/channel_item/channel_item.js +++ b/app/components/sidebars/main/channels_list/channel_item/channel_item.js @@ -14,7 +14,6 @@ import {intlShape} from 'react-intl'; import Badge from 'app/components/badge'; import ChannelIcon from 'app/components/channel_icon'; -import LoadingPlaceholder from 'app/components/loading_placeholder'; import {preventDoubleTap} from 'app/utils/tap'; import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme'; @@ -112,8 +111,20 @@ export default class ChannelItem extends PureComponent { return null; } + if (!this.props.displayName) { + return null; + } + const {intl} = this.context; + let channelDisplayName = displayName; + if (isMyUser) { + channelDisplayName = intl.formatMessage({ + id: 'channel_header.directchannel.you', + defaultMessage: '{displayName} (you)', + }, {displayname: displayName}); + } + const style = getStyleSheet(theme); const isActive = channelId === currentChannelId; @@ -133,20 +144,6 @@ export default class ChannelItem extends PureComponent { extraTextStyle = style.textUnread; } - let channelDisplayName = displayName; - if (isMyUser) { - channelDisplayName = intl.formatMessage({ - id: 'channel_header.directchannel.you', - defaultMessage: '{displayName} (you)', - }, {displayname: displayName}); - } - - if (!channelDisplayName) { - channelDisplayName = ( - - ); - } - let badge; if (mentions) { badge = ( diff --git a/app/components/sidebars/main/channels_list/channel_item/channel_item.test.js b/app/components/sidebars/main/channels_list/channel_item/channel_item.test.js index 7f4bd614f..3ce307c00 100644 --- a/app/components/sidebars/main/channels_list/channel_item/channel_item.test.js +++ b/app/components/sidebars/main/channels_list/channel_item/channel_item.test.js @@ -45,18 +45,4 @@ describe('ChannelItem', () => { expect(wrapper).toMatchSnapshot(); }); - - test('should match snapshot for no displayName', () => { - const props = { - ...baseProps, - displayName: '', - }; - - const wrapper = shallow( - , - {context: {intl: {formatMessage: jest.fn()}}}, - ); - - expect(wrapper).toMatchSnapshot(); - }); }); diff --git a/app/components/sidebars/main/main_sidebar.js b/app/components/sidebars/main/main_sidebar.js index 4f208dece..fbbfb12ec 100644 --- a/app/components/sidebars/main/main_sidebar.js +++ b/app/components/sidebars/main/main_sidebar.js @@ -139,16 +139,13 @@ export default class ChannelSidebar extends Component { drawerOpened: false, }); this.resetDrawer(); + Keyboard.dismiss(); }; handleDrawerOpen = () => { this.setState({ drawerOpened: true, }); - - if (this.state.openDrawerOffset !== 0) { - Keyboard.dismiss(); - } }; handleUpdateTitle = (channel) => { diff --git a/app/screens/about/about.js b/app/screens/about/about.js index cbbf406fb..b8c779c92 100644 --- a/app/screens/about/about.js +++ b/app/screens/about/about.js @@ -243,7 +243,7 @@ export default class About extends PureComponent { platform: ( @@ -265,20 +265,20 @@ export default class About extends PureComponent { - {'\u00a0' + config.BuildHash} + {config.BuildHash} - {'\u00a0' + config.BuildHashEnterprise} + {config.BuildHashEnterprise} @@ -286,10 +286,10 @@ export default class About extends PureComponent { - {'\u00a0' + config.BuildDate} + {config.BuildDate} @@ -325,7 +325,6 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { }, titleContainer: { flex: 1, - flexDirection: 'row', marginBottom: 20, }, title: { @@ -375,7 +374,12 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { }, footerGroup: { flex: 1, - flexDirection: 'row', + }, + footerTitleText: { + color: changeOpacity(theme.centerChannelColor, 0.5), + fontSize: 11, + fontWeight: '600', + lineHeight: 13, }, footerText: { color: changeOpacity(theme.centerChannelColor, 0.5), diff --git a/app/screens/permalink/index.js b/app/screens/permalink/index.js index fd48f4c32..7dc02212c 100644 --- a/app/screens/permalink/index.js +++ b/app/screens/permalink/index.js @@ -6,7 +6,6 @@ import {connect} from 'react-redux'; import {getChannel as getChannelAction, joinChannel, markChannelAsRead, markChannelAsViewed} from 'mattermost-redux/actions/channels'; import {getPostsAfter, getPostsBefore, getPostThread, selectPost} from 'mattermost-redux/actions/posts'; -import {Posts} from 'mattermost-redux/constants'; import {makeGetChannel, getMyChannelMemberships} from 'mattermost-redux/selectors/entities/channels'; import {makeGetPostIdsAroundPost, getPost} from 'mattermost-redux/selectors/entities/posts'; import {getTheme} from 'mattermost-redux/selectors/entities/preferences'; @@ -34,7 +33,7 @@ function makeMapStateToProps() { let channel; let postIds; - if (post && post.delete_at === 0 && post.state !== Posts.POST_DELETED) { + if (post) { channel = getChannel(state, {id: post.channel_id}); postIds = getPostIdsAroundPost(state, currentFocusedPostId, post.channel_id, { postsBeforeCount: 10, diff --git a/app/screens/permalink/permalink.js b/app/screens/permalink/permalink.js index 8b811e5aa..16241e6f2 100644 --- a/app/screens/permalink/permalink.js +++ b/app/screens/permalink/permalink.js @@ -114,10 +114,6 @@ export default class Permalink extends PureComponent { } componentWillReceiveProps(nextProps) { - if (nextProps.channelId === '' && this.mounted) { - this.handleClose(); - } - if (this.props.channelName !== nextProps.channelName && this.mounted) { this.setState({title: nextProps.channelName}); } diff --git a/app/screens/sso/sso.js b/app/screens/sso/sso.js index 2eb19f45d..dbf5f48d8 100644 --- a/app/screens/sso/sso.js +++ b/app/screens/sso/sso.js @@ -94,10 +94,14 @@ class SSO extends PureComponent { } componentDidMount() { - InteractionManager.runAfterInteractions(() => { + InteractionManager.runAfterInteractions(this.clearPreviousCookies); + } + + clearPreviousCookies = () => { + CookieManager.clearAll().then(() => { this.setState({renderWebView: true}); }); - } + }; goToLoadTeam = (expiresAt) => { const {intl, navigator} = this.props; @@ -197,7 +201,7 @@ class SSO extends PureComponent { onLoadEndError = (e) => { console.warn('Failed to set store from local data', e); // eslint-disable-line no-console this.setState({error: e.message}); - } + }; renderLoading = () => { return ; diff --git a/assets/base/i18n/en.json b/assets/base/i18n/en.json index 99def8192..06201695f 100644 --- a/assets/base/i18n/en.json +++ b/assets/base/i18n/en.json @@ -2482,7 +2482,7 @@ "mobile.more_dms.title": "New Conversation", "mobile.more_dms.you": "(@{username} - you)", "mobile.notice_mobile_link": "mobile apps", - "mobile.notice_platform_link": "platform", + "mobile.notice_platform_link": "server", "mobile.notice_text": "Mattermost is made possible by the open source software used in our {platform} and {mobile}.", "mobile.notification.in": " in ", "mobile.notification_settings.auto_responder": "Automatic Direct Message Replies", @@ -2631,6 +2631,8 @@ "mobile.video.save_error_title": "Save Video Error", "mobile.video_playback.failed_description": "An error occurred while trying to play the video.\n", "mobile.video_playback.failed_title": "Video playback failed", + "mobile.youtube_playback_error.title": "YouTube playback error", + "mobile.youtube_playback_error.description": "An error occurred while trying to play the YouTube video.\nDetails: {details}", "modal.manual_status.ask": "Do not ask me again", "modal.manual_status.auto_responder.message_": "Would you like to switch your status to \"{status}\" and disable Automatic Replies?", "modal.manual_status.auto_responder.message_away": "Would you like to switch your status to \"Away\" and disable Automatic Replies?", diff --git a/ios/Mattermost.xcodeproj/project.pbxproj b/ios/Mattermost.xcodeproj/project.pbxproj index 8a10b0ea6..bfded788e 100644 --- a/ios/Mattermost.xcodeproj/project.pbxproj +++ b/ios/Mattermost.xcodeproj/project.pbxproj @@ -2531,7 +2531,7 @@ CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 129; + CURRENT_PROJECT_VERSION = 130; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = UQ8HT4Q2XM; ENABLE_BITCODE = NO; @@ -2581,7 +2581,7 @@ CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 129; + CURRENT_PROJECT_VERSION = 130; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = UQ8HT4Q2XM; ENABLE_BITCODE = NO; diff --git a/ios/Mattermost/Info.plist b/ios/Mattermost/Info.plist index 90131f7ea..66f92eabf 100644 --- a/ios/Mattermost/Info.plist +++ b/ios/Mattermost/Info.plist @@ -34,7 +34,7 @@ CFBundleVersion - 129 + 130 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS diff --git a/ios/MattermostShare/Info.plist b/ios/MattermostShare/Info.plist index cd7d4e3d1..abac4fcbd 100644 --- a/ios/MattermostShare/Info.plist +++ b/ios/MattermostShare/Info.plist @@ -23,7 +23,7 @@ CFBundleShortVersionString 1.11.0 CFBundleVersion - 129 + 130 NSAppTransportSecurity NSAllowsArbitraryLoads diff --git a/ios/MattermostTests/Info.plist b/ios/MattermostTests/Info.plist index 8ba6c5668..987b24f91 100644 --- a/ios/MattermostTests/Info.plist +++ b/ios/MattermostTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 129 + 130 diff --git a/package-lock.json b/package-lock.json index 523f08d27..c44ff0ad8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10128,8 +10128,8 @@ } }, "mattermost-redux": { - "version": "github:mattermost/mattermost-redux#f13022064f1ed24a0d1c085f433490f9d40cfc2f", - "from": "github:mattermost/mattermost-redux#f13022064f1ed24a0d1c085f433490f9d40cfc2f", + "version": "github:mattermost/mattermost-redux#0394a5b74c038e59ed4b80d2bea5f2327dc7e156", + "from": "github:mattermost/mattermost-redux#0394a5b74c038e59ed4b80d2bea5f2327dc7e156", "requires": { "deep-equal": "1.0.1", "eslint-plugin-header": "1.2.0", @@ -14641,13 +14641,6 @@ "prop-types": "^15.5.10" } }, - "react-native-animated-ellipsis": { - "version": "github:sudheerDev/react-native-animated-ellipsis#326167b8e0fa3b6f0422c06be412bf177b725666", - "from": "github:sudheerDev/react-native-animated-ellipsis#326167b8e0fa3b6f0422c06be412bf177b725666", - "requires": { - "prop-types": "^15.5.10" - } - }, "react-native-bottom-sheet": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/react-native-bottom-sheet/-/react-native-bottom-sheet-1.0.3.tgz", diff --git a/package.json b/package.json index 9c4195618..196c317a3 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,13 @@ "intl": "1.2.5", "jail-monkey": "1.0.0", "jsc-android": "216113.0.3", - "mattermost-redux": "github:mattermost/mattermost-redux#f13022064f1ed24a0d1c085f433490f9d40cfc2f", + "mattermost-redux": "github:mattermost/mattermost-redux#0394a5b74c038e59ed4b80d2bea5f2327dc7e156", "mime-db": "1.33.0", "prop-types": "15.6.1", "react": "16.3.2", "react-intl": "2.4.0", "react-native": "github:enahum/react-native#mm", "react-native-animatable": "1.2.4", - "react-native-animated-ellipsis": "sudheerDev/react-native-animated-ellipsis.git#326167b8e0fa3b6f0422c06be412bf177b725666", "react-native-bottom-sheet": "1.0.3", "react-native-button": "2.3.0", "react-native-circular-progress": "0.2.0",