Re-add books to queue that failed or were cancelled.

This commit is contained in:
Michael Bucari-Tovo 2025-02-28 10:42:14 -07:00
parent a9375f1520
commit 3b7d5a354f
3 changed files with 28 additions and 2 deletions

View file

@ -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)