Pinned events : banner goes backward instead of forward
This commit is contained in:
parent
4330b1e685
commit
3cdf0971a6
2 changed files with 4 additions and 4 deletions
|
|
@ -79,10 +79,10 @@ class PinnedMessagesBannerPresenter @Inject constructor(
|
|||
fun handleEvent(event: PinnedMessagesBannerEvents) {
|
||||
when (event) {
|
||||
is PinnedMessagesBannerEvents.MoveToNextPinned -> {
|
||||
if (currentPinnedMessageIndex < pinnedItems.size - 1) {
|
||||
currentPinnedMessageIndex++
|
||||
if (currentPinnedMessageIndex > 0) {
|
||||
currentPinnedMessageIndex--
|
||||
} else {
|
||||
currentPinnedMessageIndex = 0
|
||||
currentPinnedMessageIndex = pinnedItems.size - 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue