From 220a8140fea9911dc0b7cefcdb8cb2507c83a3d1 Mon Sep 17 00:00:00 2001 From: Brayan Oliveira <69634269+brayandso@users.noreply.github.com> Date: Mon, 27 May 2024 06:24:47 -0300 Subject: [PATCH] refactor: move !! --- .../com/ichi2/anki/ui/windows/reviewer/ReviewerViewModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/ui/windows/reviewer/ReviewerViewModel.kt b/AnkiDroid/src/main/java/com/ichi2/anki/ui/windows/reviewer/ReviewerViewModel.kt index 4a7372ead5c8..025a6656c938 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/ui/windows/reviewer/ReviewerViewModel.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/ui/windows/reviewer/ReviewerViewModel.kt @@ -41,10 +41,10 @@ class ReviewerViewModel(cardMediaPlayer: CardMediaPlayer) : PostRequestHandler { private var queueState: Deferred = asyncIO { - withCol { sched.currentQueueState() } + // this assumes that the Reviewer won't be launched if there isn't a queueState + withCol { sched.currentQueueState() }!! } override var currentCard = asyncIO { - // this assumes that the Reviewer won't be launched if there isn't a queueState queueState.await()!!.topCard } var isQueueFinishedFlow = MutableSharedFlow()