Skip to content

Commit d412f10

Browse files
committed
chore: simplify call
1 parent b1a7b83 commit d412f10

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/src/main/java/to/bitkit/ui/shared/toast/ToastQueueManager.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ class ToastQueueManager(private val scope: CoroutineScope) {
7878
* Resume current toast timer with FULL duration (called on drag end).
7979
*/
8080
fun resumeCurrentToast() {
81-
if (isPaused && _currentToast.value != null) {
81+
val toast = _currentToast.value
82+
if (isPaused && toast != null) {
8283
isPaused = false
83-
val toast = _currentToast.value
84-
if (toast?.autoHide == true) {
84+
if (toast.autoHide) {
8585
startTimer(toast.visibilityTime)
8686
}
8787
}

0 commit comments

Comments
 (0)