Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 3c5a48d

Browse files
authored
fix: LSDV-5235: Use alternate check for postpone based on presence of interfaces instead of FF (#1435)
1 parent 3ff8ae5 commit 3c5a48d

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/components/TopBar/CurrentTask.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { observer } from 'mobx-react';
22
import { useEffect, useMemo, useState } from 'react';
33
import { Button } from '../../common/Button/Button';
44
import { Block, Elem } from '../../utils/bem';
5-
import { FF_DEV_3034, FF_DEV_3873, FF_DEV_4174, isFF } from '../../utils/feature-flags';
5+
import { FF_DEV_3873, FF_DEV_4174, isFF } from '../../utils/feature-flags';
66
import { guidGenerator } from '../../utils/unique';
77
import { isDefined } from '../../utils/utilities';
88
import './CurrentTask.styl';
@@ -42,24 +42,23 @@ export const CurrentTask = observer(({ store }) => {
4242
const showCounter = store.hasInterface('topbar:task-counter');
4343

4444
// @todo some interface?
45-
let canPostpone = isFF(FF_DEV_3034)
46-
&& !isDefined(store.annotationStore.selected.pk)
45+
let canPostpone = !isDefined(store.annotationStore.selected.pk)
4746
&& !store.canGoNextTask
4847
&& !store.hasInterface('review')
4948
&& store.hasInterface('postpone');
5049

5150

52-
if (isFF(FF_DEV_4174)) {
51+
if (store.hasInterface('annotations:comments') && isFF(FF_DEV_4174)) {
5352
canPostpone = canPostpone && store.commentStore.addedCommentThisSession && (visibleComments >= initialCommentLength);
5453
}
5554

5655
return (
5756
<Elem name="section">
5857
<Block name="current-task" mod={{ 'with-history': historyEnabled }} style={{
59-
padding:isFF(FF_DEV_3873) && 0,
60-
width:isFF(FF_DEV_3873) && 'auto',
58+
padding: isFF(FF_DEV_3873) && 0,
59+
width: isFF(FF_DEV_3873) && 'auto',
6160
}}>
62-
<Elem name="task-id" style={{ fontSize:isFF(FF_DEV_3873) ? 12 : 14 }}>
61+
<Elem name="task-id" style={{ fontSize: isFF(FF_DEV_3873) ? 12 : 14 }}>
6362
{store.task.id ?? guidGenerator()}
6463
{historyEnabled && showCounter && (
6564
<Elem name="task-count">

0 commit comments

Comments
 (0)