-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add preview of images in Apps catalog #815
Add preview of images in Apps catalog #815
Conversation
@@ -250,6 +250,8 @@ decompose-jetpack = { module = "com.arkivanov.decompose:extensions-compose", ver | |||
essenty-lifecycle = { module = "com.arkivanov.essenty:lifecycle", version.ref = "essenty" } | |||
essenty-lifecycle-coroutines = { module = "com.arkivanov.essenty:lifecycle-coroutines", version.ref = "essenty" } | |||
|
|||
zoomable = { module = "net.engawapg.lib:zoomable", version.ref = "zoomable" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The library looks good, updating with bot, have Modifier.Node api. In case of KMP we can create PR to add it's support later
@@ -12,7 +13,8 @@ abstract class BottomBarDecomposeComponent<C : Any> : CompositeDecomposeComponen | |||
operator fun invoke( | |||
componentContext: ComponentContext, | |||
onBack: DecomposeOnBackParameter, | |||
deeplink: Deeplink.BottomBar? | |||
deeplink: Deeplink.BottomBar?, | |||
screenshotsClickListener: ScreenshotsClickListener |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's overall "little bit" callback hell right now. But even deeplinks will be required inside AssistedFactories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should use LocalRootNavigation
in this case. Could you, please, check this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced with LocalRootNavigation
screenshots: ImmutableList<String>, | ||
urlImageShareViewModel: UrlImageShareViewModel | ||
) { | ||
val itemsAmount = remember { screenshots.size } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that current keys in remember
is correct? Maybe use screenshots
as key?
Also i'm not sure if it's really necessary to use remember here. Can you check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously there was different chunk of code. Indeed in ImmutableList the size
is set at init and can't be changed after. So it's useless now
.size(24.dp) | ||
.clickableRipple(bounded = false, onClick = onBack), | ||
painter = painterResource(DesignSystem.drawable.ic_back), | ||
contentDescription = null.orEmpty() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use null
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added contentDescription
...kotlin/com/flipperdevices/faphub/screenshotspreview/impl/viewmodel/UrlImageShareViewModel.kt
Show resolved
Hide resolved
private fun Bitmap.fillBackground(): Bitmap { | ||
val newBitmap = Bitmap.createBitmap(width, height, config) | ||
val canvas = Canvas(newBitmap) | ||
canvas.drawColor(Color.rgb(ACCENT_COLOR_R, ACCENT_COLOR_G, ACCENT_COLOR_B)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe reuse the colour from other place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced with accent color from DesignSystem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for your work - it's of incredible quality both in terms of code and final user experience!
Background
Currently int application users doesn't have an ability to preiew screenshots of hub applications.
Changes
Test plan