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

Commit 640d531

Browse files
authored
fix: LSDV-5235: Use alternate check for postpone based on presence of interfaces instead of FF (#1434)
1 parent 715d8b7 commit 640d531

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/components/TopBar/CurrentTask.js

Lines changed: 6 additions & 8 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';
@@ -41,25 +41,23 @@ export const CurrentTask = observer(({ store }) => {
4141
const historyEnabled = store.hasInterface('topbar:prevnext');
4242
const showCounter = store.hasInterface('topbar:task-counter');
4343

44-
// @todo some interface?
45-
let canPostpone = isFF(FF_DEV_3034)
46-
&& !isDefined(store.annotationStore.selected.pk)
44+
let canPostpone = !isDefined(store.annotationStore.selected.pk)
4745
&& !store.canGoNextTask
4846
&& !store.hasInterface('review')
4947
&& store.hasInterface('postpone');
5048

5149

52-
if (isFF(FF_DEV_4174)) {
50+
if (store.hasInterface('annotations:comments') && isFF(FF_DEV_4174)) {
5351
canPostpone = canPostpone && store.commentStore.addedCommentThisSession && (visibleComments >= initialCommentLength);
5452
}
5553

5654
return (
5755
<Elem name="section">
5856
<Block name="current-task" mod={{ 'with-history': historyEnabled }} style={{
59-
padding:isFF(FF_DEV_3873) && 0,
60-
width:isFF(FF_DEV_3873) && 'auto',
57+
padding: isFF(FF_DEV_3873) && 0,
58+
width: isFF(FF_DEV_3873) && 'auto',
6159
}}>
62-
<Elem name="task-id" style={{ fontSize:isFF(FF_DEV_3873) ? 12 : 14 }}>
60+
<Elem name="task-id" style={{ fontSize: isFF(FF_DEV_3873) ? 12 : 14 }}>
6361
{store.task.id ?? guidGenerator()}
6462
{historyEnabled && showCounter && (
6563
<Elem name="task-count">

0 commit comments

Comments
 (0)