Re-add books to queue that failed or were cancelled.
This commit is contained in:
parent
a9375f1520
commit
3b7d5a354f
3 changed files with 28 additions and 2 deletions
|
|
@ -169,6 +169,16 @@ namespace LibationUiBase
|
|||
}
|
||||
}
|
||||
|
||||
public T FirstOrDefault(Func<T, bool> predicate)
|
||||
{
|
||||
lock (lockObject)
|
||||
{
|
||||
return Current != null && predicate(Current) ? Current
|
||||
: _completed.FirstOrDefault(predicate) is T completed ? completed
|
||||
: _queued.FirstOrDefault(predicate);
|
||||
}
|
||||
}
|
||||
|
||||
public void MoveQueuePosition(T item, QueuePosition requestedPosition)
|
||||
{
|
||||
lock (lockObject)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue