Browse Source

Fix Poll history 'Load more' button alignment (#2577)

* Fix Poll history 'Load more' button alignment

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
pull/2586/head
Jorge Martin Espinosa 6 months ago committed by GitHub
parent
commit
f4e5934d1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryStateProvider.kt
  2. 1
      features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryView.kt
  3. 3
      tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Day-1_2_null_4,NEXUS_5,1.0,en].png
  4. 3
      tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Night-1_3_null_4,NEXUS_5,1.0,en].png

5
features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryStateProvider.kt

@ -41,6 +41,11 @@ class PollHistoryStateProvider : PreviewParameterProvider<PollHistoryState> { @@ -41,6 +41,11 @@ class PollHistoryStateProvider : PreviewParameterProvider<PollHistoryState> {
activeFilter = PollHistoryFilter.PAST,
currentItems = emptyList(),
),
aPollHistoryState(
activeFilter = PollHistoryFilter.PAST,
currentItems = emptyList(),
hasMoreToLoad = true,
),
)
}

1
features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryView.kt

@ -191,6 +191,7 @@ private fun PollHistoryList( @@ -191,6 +191,7 @@ private fun PollHistoryList(
Column(
modifier = Modifier.fillParentMaxSize().padding(bottom = 24.dp),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally,
) {
val emptyStringResource = if (filter == PollHistoryFilter.PAST) {
stringResource(R.string.screen_polls_history_empty_past)

3
tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Day-1_2_null_4,NEXUS_5,1.0,en].png

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:821058570014a0418b22eb4119122b595f802cabeffcabe30c9085b1485ab2c2
size 19568

3
tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Night-1_3_null_4,NEXUS_5,1.0,en].png

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a174fd40ab7fa21541c6cf2e25edbe3f286c5aaf7103ec8cf6c4dbc94bba373e
size 18512
Loading…
Cancel
Save