electrolobzik
02/15/2024, 2:44 PMinit {
lifecycle.doOnResume {
log(" lifecycle.doOnResume")
store.accept(Intent.RefreshLocationStatus)
store.accept(Intent.RefreshSelfieStatus)
}
}
Djuro
02/20/2024, 9:23 AM1.6.0-beta01
versions be available?Arkadii Ivanov
02/20/2024, 9:32 PM3.0.0-alpha07
is released!
👉 Don't remove the first configuration on popWhile
👉 Inlined the rest of navigation extensions with lambdas
👉 Updated Kotlin to 1.9.22
, Compose to 1.6.0-rc02
, also updated Pages
Composable API
👉 Buffer navigation events during initialisation
👉 Added androidPredictiveBackAnimatable
👉 Updated Essenty to 2.0.0-alpha07
👉 Removed ApplicationLifecycle
and used the new one from Essenty
👉 Fixed predictive back gesture not working when started during normal transition
Release notes: https://github.com/arkivanov/Decompose/releases/tag/3.0.0-alpha07Djuro
02/23/2024, 9:04 AM3.0.0-alpha07
It has nothing to do with decompose but Android Studio IDE gives errors like
unresolved kotlinx.coroutines
for example.
This is also present on a bunch of other places and gives weird errors
I am using Kotlin 1.9.21
and jetbrains-compose 1.6.0-alpha01
due limitations imposed by another library.
Did anyone have a similar issue?Abdul Basit
02/24/2024, 1:38 PMEssenty
ribesg
02/26/2024, 2:54 PMComposeUIViewController
just does not seem to start or somethingelectrolobzik
02/29/2024, 3:57 PMChildren
block in the ProfileRoot function and change the navigation (once) from “Profile” to “Replace Selfie” I get a lot of calls and the most weird part is that the children alternate. I tried to find a source of this problem, but with no luck. Do you have any idea why it may happen? (logs in the thread)Djuro
03/01/2024, 10:42 AMMutableValue
or similar that doesn't reemit the same value. I am interested if there is something provided by the lib that has this behaviour.
I noticed that `MutableValue`'s compareAndSet
reemit the same values. Is there if not that, then at least an atomic get
that uses a mutex/lock so that I could perform a check before I update
my MutableValue
?Vaibhav Jaiswal
03/01/2024, 1:13 PMFeedPostItem(
post = it,
modifier = Modifier.fillMaxWidth(),
onAction = component::handlePostAction
)
Arkadii Ivanov
03/02/2024, 4:14 PM3.0.0-alpha08
is released!
👉 Fixed predictive back animation not working sometimes (regression in 3.0.0-alpha07
)
👉 Fixed screen corners blinking when the predictive back gesture starts
👉 Fixed screen corner animations in androidPredictiveBackAnimatable
👉 Minor fixes and changes
Release notes: https://github.com/arkivanov/Decompose/releases/tag/3.0.0-alpha08Nicholas Tietje
03/04/2024, 4:59 AMVaibhav Jaiswal
03/07/2024, 3:16 PMAnum Amin
03/11/2024, 7:11 PMVaibhav Jaiswal
03/12/2024, 11:07 AMRootComponent
|-> ScreenAComponent
|-> ScreenBComponent
............
I want to have a parent component only for ScreenA and ScreenB,
Which is alive till either of the component is alive, and should destroy when none of the two component is in the StackArkadii Ivanov
03/14/2024, 9:46 PM3.0.0-alpha09
is released!
👉 Improved component context API for easier custom component contexts
👉 Monitor window focused state in desktop LifecycleController
👉 Updated Kotlin to 1.9.23
, Compose to 1.6.1
and other dependencies
Release notes: https://github.com/arkivanov/Decompose/releases/tag/3.0.0-alpha09s3rius
03/19/2024, 8:19 AMchildContext()
function to shadow ComponentContext.childContext().
interface AppContext : ComponentContext {
val parentContext: AppContext?
}
private class DefaultAppContext(override val parentContext: AppContext?, baseContext: ComponentContext) :
AppContext,
ComponentContext by baseContext
fun AppContext.childContext(key: String) = DefaultAppContext(this, childContext(key)) // <- this actually resolves fine
All-in-all this actually works quite nicely; most details are abstracted away and I can easily provide some functionality to all components. With the proper TestContext testing is no problem too.
With the new factory, I think it would change into this:
private class DefaultAppContext(
override val parentContext: AppContext?,
override val lifecycle: Lifecycle,
override val stateKeeper: StateKeeper
override val instanceKeeper: InstanceKeeper
override val backHandler: BackHandler
) : AppContext, ComponentContext {
override val componentContextFactory = AppComponentContextFactory(this)
}
class AppComponentContextFactory(val self: AppContext) : ComponentContextFactory<AppContext> {
operator fun invoke(
lifecycle: Lifecycle,
stateKeeper: StateKeeper,
instanceKeeper: InstanceKeeper,
backHandler: BackHandler,
) = DefaultAppContext(self, lifecycle, StateKeeper, instanceKeeper, backHandler)
}
Basically the same; probably a little nicer due to the removal of the childContext override.
If you have an idea for a more elegant solution, I'd love to hear it!electrolobzik
03/19/2024, 5:18 PMrouter
which could make this logging, I am looking in direction of making a copy of DefaultStackNavigation
but I really don’t like this solution much. Also it doesn’t cover slot navigation and has a lot of other cons.Vaibhav Jaiswal
03/22/2024, 4:10 PMAnshulupadhyay03
03/23/2024, 2:19 PMprivate fun onMovieSelected(movieId: Int) {
println("item onMovieSelected-$movieId")
navigation.push(Configuration.Details(movieId), onComplete = {
println("Ansh: isMovieSelected ")
})
}
main class for iOS
fun MainViewController(lifecycle: LifecycleRegistry) = ComposeUIViewController {
CompositionLocalProvider{
val root = MovieBuffRootImpl(DefaultComponentContext(lifecycle = lifecycle))
App(root)
}
}
MovieBuffRootImpl :
https://pastebin.com/rTBU8ZaxVaibhav Jaiswal
03/28/2024, 10:38 AMAnshulupadhyay03
03/28/2024, 9:55 PM[plugins]
darwinParcel = { id = "com.arkivanov.parcelize.darwin:gradle-plugin", version.ref = "darwinParcel" } // darwinParcel = "0.2.4"
in my grade file I mention this as
plugins {
//trick: for the same plugin versions in all sub-modules
alias(libs.plugins.darwinParcel) apply false
}
but I am getting error
org.gradle.plugin.internal.InvalidPluginIdException: plugin id 'com.arkivanov.parcelize.darwin:gradle-plugin' is invalid: Plugin id contains invalid char ':' (only ASCII alphanumeric characters, '.', '_' and '-' characters are valid)
Abdul Basit
03/29/2024, 6:48 PMcom.arkivanov.decompose:extensions-compose-jetbrains:2.2.2-compose-experimental
Essentry: com.arkivanov.essenty:lifecycle:1.3.0
Compose Multiplatform: 1.5.11
I am using regular framework instead of cocopods
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = "shared"
isStatic = true
export("com.arkivanov.decompose:extensions-compose-jetbrains:2.2.2-compose-experimental")
export("com.arkivanov.essenty:lifecycle:1.3.0")
}
}
This is how i am calling my the main:
import SwiftUI
import shared
struct ComposeView: UIViewControllerRepresentable {
private var lifecycleHolder: LifecycleHolder { LifecycleHolder() }
func makeUIViewController(context: Context) -> UIViewController {
Main_iosKt.MainiOS(lifecycle: lifecycleHolder.lifecycle)
}
func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
}
struct ContentView: View {
var body: some View {
ComposeView()
.ignoresSafeArea(.keyboard) // Compose has own keyboard handler
}
}
iosApp`:
0x102bd46a0 <+0>: sub sp, sp, #0x40
0x102bd46a4 <+4>: stp x29, x30, [sp, #0x30]
0x102bd46a8 <+8>: add x29, sp, #0x30
0x102bd46ac <+12>: str x0, [sp, #0x8]
0x102bd46b0 <+16>: add x8, sp, #0x18
0x102bd46b4 <+20>: str x8, [sp, #0x10]
0x102bd46b8 <+24>: b 0x102bd46bc ; <+28> at CoroutineExceptionHandlerImpl.kt
0x102bd46bc <+28>: ldr x9, [sp, #0x8]
0x102bd46c0 <+32>: ldr x8, [sp, #0x10]
0x102bd46c4 <+36>: str x9, [x8, #0x10]!
0x102bd46c8 <+40>: str x8, [sp]
0x102bd46cc <+44>: b 0x102bd46d0 ; <+48> at CoroutineExceptionHandlerImpl.kt:25:17
0x102bd46d0 <+48>: adrp x8, 7286
0x102bd46d4 <+52>: ldr x8, [x8, #0x888]
0x102bd46d8 <+56>: cbz x8, 0x102bd46e8 ; <+72> at CoroutineExceptionHandlerImpl.kt
0x102bd46dc <+60>: b 0x102bd46e0 ; <+64> at CoroutineExceptionHandlerImpl.kt:25:17
0x102bd46e0 <+64>: bl 0x1035d4448 ; (anonymous namespace)::slowPath()
0x102bd46e4 <+68>: b 0x102bd46e8 ; <+72> at CoroutineExceptionHandlerImpl.kt
0x102bd46e8 <+72>: b 0x102bd46ec ; <+76> at CoroutineExceptionHandlerImpl.kt:1:1
0x102bd46ec <+76>: adrp x8, 7284
0x102bd46f0 <+80>: add x8, x8, #0x414 ; state_global$kotlinx.coroutines.internal$/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/native/src/internal/CoroutineExceptionHandlerImpl.kt
0x102bd46f4 <+84>: ldar w8, [x8]
0x102bd46f8 <+88>: subs w8, w8, #0x2
0x102bd46fc <+92>: b.eq 0x102bd4720 ; <+128> at CoroutineExceptionHandlerImpl.kt
0x102bd4700 <+96>: b 0x102bd4704 ; <+100> at CoroutineExceptionHandlerImpl.kt:1:1
0x102bd4704 <+100>: adrp x0, 7284
0x102bd4708 <+104>: add x0, x0, #0x414 ; state_global$kotlinx.coroutines.internal$/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/native/src/internal/CoroutineExceptionHandlerImpl.kt
0x102bd470c <+108>: adrp x1, 0
0x102bd4710 <+112>: add x1, x1, #0x22c ; kfun:kotlinx.coroutines.internal.$init_global#internal.74 at CoroutineExceptionHandlerImpl.kt
0x102bd4714 <+116>: bl 0x1035ef8d4 ; CallInitGlobalPossiblyLock
0x102bd4718 <+120>: b 0x102bd471c ; <+124> at CoroutineExceptionHandlerImpl.kt:1:1
0x102bd471c <+124>: b 0x102bd4720 ; <+128> at CoroutineExceptionHandlerImpl.kt
0x102bd4720 <+128>: ldr x8, [sp]
0x102bd4724 <+132>: ldr x0, [x8]
0x102bd4728 <+136>: bl 0x1035d6890 ; Kotlin_processUnhandledException
-> 0x102bd472c <+140>: b 0x102bd4730 ; <+144> at CoroutineExceptionHandlerImpl.kt:28:2
0x102bd4730 <+144>: b 0x102bd4734 ; <+148> at CoroutineExceptionHandlerImpl.kt:28:2
0x102bd4734 <+148>: ldp x29, x30, [sp, #0x30]
0x102bd4738 <+152>: add sp, sp, #0x40
0x102bd473c <+156>: ret
John O'Reilly
03/30/2024, 8:36 AMsubscribeAsState
comes in through com.arkivanov.decompose:extensions-compose-jetbrains
but can't use that in commonMain
val uiState by component.uiState.subscribeAsState()
Arkadii Ivanov
04/06/2024, 2:12 PM3.0.0-beta01
is released!
👉 Discard back gesture in PredictiveBackGestureOverlay
when swiped in the opposite direction
👉 Print configurations on uniqueness violation
👉 Updated Essenty to 2.0.0-beta01
Release notes: https://github.com/arkivanov/Decompose/releases/tag/3.0.0-beta01electrolobzik
04/06/2024, 6:15 PMs3rius
04/08/2024, 12:09 PMDennis
04/16/2024, 12:27 PMVaibhav Jaiswal
04/19/2024, 2:30 PMShabinder Singh
04/21/2024, 6:43 AMArkadii Ivanov
04/25/2024, 9:53 AM2.2.3
is released!
👉 Bug fix: component Lifecycle
unnecessary stops and resumes sometimes on initialisation, if the root component is created using Lazy
Release notes: https://github.com/arkivanov/Decompose/releases/tag/2.2.3