MM-18353 Do not update the theme when resetting the cache (#3250)
This commit is contained in:
parent
b795a0bba4
commit
cbb20d759f
1 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue