only unsubscribe when disabling the UI

This commit is contained in:
Gábor Farkas 2022-09-05 14:40:31 +02:00
parent a82d4ace67
commit be39da3af1

View File

@ -740,7 +740,7 @@ export const queryReducer = (state: ExploreItemState, action: AnyAction): Explor
if (setLogsVolumeEnabledAction.match(action)) {
const { enabled } = action.payload;
if (state.logsVolumeDataSubscription) {
if (!enabled && state.logsVolumeDataSubscription) {
state.logsVolumeDataSubscription.unsubscribe();
}
return {