refactor: use '--' for int decremention instead of '-= 1'

This commit is contained in:
Bnyro 2023-10-26 15:58:44 +02:00
parent 373b297f97
commit b9c59d492f
3 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ class VideosAdapter(
it.url?.toID() == videoId
}.takeIf { it > 0 } ?: return
streamItems.removeAt(index)
visibleCount -= 1
visibleCount--
notifyItemRemoved(index)
notifyItemRangeChanged(index, itemCount)
}

View File

@ -34,7 +34,7 @@ class WatchHistoryAdapter(
DatabaseHolder.Database.watchHistoryDao().delete(history)
}
watchHistory.removeAt(position)
visibleCount -= 1
visibleCount--
notifyItemRemoved(position)
notifyItemRangeChanged(position, itemCount)
}

View File

@ -66,7 +66,7 @@ class AutoplayCountdownView(
R.string.playing_next,
currentTimerState.toString()
)
currentTimerState -= 1
currentTimerState--
handler.postDelayed(1000, TIMER_RUNNABLE_TOKEN, this::updateCountdown)
}