(index: number, position: number)
| 15 | |
| 16 | class QueueList extends React.Component<QueueListProps, QueueListState> { |
| 17 | public static queueState(index: number, position: number) { |
| 18 | if (index < position) { |
| 19 | return QueueItemState.Played; |
| 20 | } |
| 21 | |
| 22 | if (index === position) { |
| 23 | return QueueItemState.Playing; |
| 24 | } |
| 25 | |
| 26 | return QueueItemState.Queued; |
| 27 | } |
| 28 | |
| 29 | public static getDerivedStateFromProps(props: QueueListProps) { |
| 30 | const { queue } = props.mk.instance.player; |
no outgoing calls
no test coverage detected