Skip to content

Commit 49f4526

Browse files
committed
Pinned events : banner goes backward instead of forward
1 parent 04995cb commit 49f4526

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/pinned/banner/PinnedMessagesBannerPresenter.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ class PinnedMessagesBannerPresenter @Inject constructor(
7979
fun handleEvent(event: PinnedMessagesBannerEvents) {
8080
when (event) {
8181
is PinnedMessagesBannerEvents.MoveToNextPinned -> {
82-
if (currentPinnedMessageIndex < pinnedItems.size - 1) {
83-
currentPinnedMessageIndex++
82+
if (currentPinnedMessageIndex > 0) {
83+
currentPinnedMessageIndex--
8484
} else {
85-
currentPinnedMessageIndex = 0
85+
currentPinnedMessageIndex = pinnedItems.size - 1
8686
}
8787
}
8888
}

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ jsoup = "org.jsoup:jsoup:1.18.1"
163163
appyx_core = { module = "com.bumble.appyx:core", version.ref = "appyx" }
164164
molecule-runtime = "app.cash.molecule:molecule-runtime:2.0.0"
165165
timber = "com.jakewharton.timber:timber:5.0.1"
166-
matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.2.37"
166+
matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.2.38"
167167
matrix_richtexteditor = { module = "io.element.android:wysiwyg", version.ref = "wysiwyg" }
168168
matrix_richtexteditor_compose = { module = "io.element.android:wysiwyg-compose", version.ref = "wysiwyg" }
169169
sqldelight-driver-android = { module = "app.cash.sqldelight:android-driver", version.ref = "sqldelight" }

0 commit comments

Comments
 (0)