MM-18353 Do not update the theme when resetting the cache (#3250)

This commit is contained in:
Elias Nahum 2019-09-13 11:38:44 -03:00 committed by jfrerich
parent b795a0bba4
commit cbb20d759f

View file

@ -1,7 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React, {PureComponent} from 'react';
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {injectIntl, intlShape} from 'react-intl';
import {
@ -25,7 +25,7 @@ import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
import Config from 'assets/config';
class AdvancedSettings extends PureComponent {
class AdvancedSettings extends Component {
static propTypes = {
actions: PropTypes.shape({
dismissAllModals: PropTypes.func.isRequired,
@ -45,6 +45,10 @@ class AdvancedSettings extends PureComponent {
this.getDownloadCacheSize();
}
shouldComponentUpdate(nextProps) {
return this.props.theme === nextProps.theme;
}
clearOfflineCache = preventDoubleTap(() => {
const {formatMessage} = this.props.intl;