Fix issues detected by Paparazzi
This commit is contained in:
committed by
Benoit Marty
parent
70f8ac20b6
commit
8cc2d77964
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -142,7 +142,9 @@ class ExoPlayerForPreview(
|
||||
override fun getMediaItemCount(): Int = throw NotImplementedError()
|
||||
override fun getMediaItemAt(index: Int): MediaItem = throw NotImplementedError()
|
||||
override fun getDuration(): Long = throw NotImplementedError()
|
||||
override fun getCurrentPosition(): Long = throw NotImplementedError()
|
||||
|
||||
// Cannot throw, this method is invoked when recording Paparazzi screenshots.
|
||||
override fun getCurrentPosition(): Long = 0L
|
||||
override fun getBufferedPosition(): Long = throw NotImplementedError()
|
||||
override fun getBufferedPercentage(): Int = throw NotImplementedError()
|
||||
override fun getTotalBufferedDuration(): Long = throw NotImplementedError()
|
||||
|
||||
Reference in New Issue
Block a user