mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Fix issues detected by Paparazzi
This commit is contained in:
committed by
Benoit Marty
parent
8220e4bae0
commit
ba70938667
+4
-2
@@ -114,8 +114,10 @@ private fun ReactionSummaryViewContent(
|
||||
LaunchedEffect(pagerState.currentPage) {
|
||||
selectedReactionKey = summary.reactions[pagerState.currentPage].key
|
||||
val visibleInfo = reactionListState.layoutInfo.visibleItemsInfo
|
||||
if (selectedReactionIndex <= visibleInfo.first().index || selectedReactionIndex >= visibleInfo.last().index) {
|
||||
reactionListState.animateScrollToItem(selectedReactionIndex)
|
||||
if (visibleInfo.isNotEmpty()) {
|
||||
if (selectedReactionIndex <= visibleInfo.first().index || selectedReactionIndex >= visibleInfo.last().index) {
|
||||
reactionListState.animateScrollToItem(selectedReactionIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-1
@@ -32,7 +32,12 @@ open class DeveloperSettingsStateProvider : PreviewParameterProvider<DeveloperSe
|
||||
),
|
||||
aDeveloperSettingsState(
|
||||
isEnterpriseBuild = true,
|
||||
showColorPicker = true,
|
||||
// Disable the color picker for now, Paparazzi is failing with:
|
||||
// java.lang.IllegalArgumentException: Cannot round NaN value.
|
||||
// at kotlin.math.MathKt__MathJVMKt.roundToInt(MathJVM.kt:1210)
|
||||
// at io.mhssn.colorpicker.ext.ColorExtKt.lighten(ColorExt.kt:86)
|
||||
// at io.mhssn.colorpicker.pickers.ClassicColorPickerKt$ClassicColorPicker$1$1.invokeSuspend(ClassicColorPicker.kt:53)
|
||||
showColorPicker = false,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user