use feature flag when fetching thread bindings (#6018)

This commit is contained in:
Michael Kochell 2022-03-22 23:03:03 -04:00 committed by GitHub
parent be74987614
commit 784b897d2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,7 @@ import {makeGetPostIdsForThread} from '@mm-redux/selectors/entities/posts';
import {getTheme, isCollapsedThreadsEnabled} from '@mm-redux/selectors/entities/preferences';
import {getThread} from '@mm-redux/selectors/entities/threads';
import {getThreadLastViewedAt} from '@selectors/threads';
import {appsEnabled} from '@utils/apps';
import Thread from './thread';
@ -42,7 +43,7 @@ function makeMapStateToProps() {
theme: getTheme(state),
thread,
threadLoadingStatus: state.requests.posts.getPostThread,
shouldFetchBindings: ownProps.channelId !== getCurrentChannelId(state),
shouldFetchBindings: appsEnabled(state) && ownProps.channelId !== getCurrentChannelId(state),
};
};
}