Luis Alonso Ato Neyra
11/27/2022, 12:10 AMMichael Paus
11/28/2022, 11:10 AMRyan Smith
11/28/2022, 11:33 PMMainScope()
from my application
block and pass it around
• My ViewModel instances receive the application CoroutineScope
as a constructor parameter and setup a view model scope from that using CoroutineScope(coroutineScope.coroutineContext + SupervisorJob())
• My ViewModel instances launch coroutines to the data layer using scope.launch
or scope.async
builders.
• At application shutdown, the application coroutine scope has it's cancel
method called like appCoroutineScope.cancel("Application Shutdown")
I originally thought this was sufficient to make sure all jobs were correctly cancelled on shutdown, but I haven't been able to convince myself things are actually shutting down properly.frank
11/29/2022, 11:33 AMFlow
properly in Compose Desktop, I have searched but only find examples for Android.
I get the data from Kmongo:
class TagDAO {
companion object {
private val tagsDB by lazy { Connection().getCollection<Tag>("tags") }
fun listTags(): Flow<Tag> {
return tagsDB.find().toFlow()
}
}
}
@Composable
fun form() {
val tagsFlow = TagDAO.listTags() // Flow<Tag>
val tagsState by tagsFlow.collectAsState(initial = Tag()) // Only return last value
}
Sebastian Kürten
11/29/2022, 5:19 PMkevin.cianfarini
11/29/2022, 9:36 PMcompose-jb
? I’m trying to expose a molecule flow to an iOS framework and I’m getting the following error.
e: org.jetbrains.kotlin.util.KotlinFrontEndException: Exception while analyzing expression at (36,9) in /Users/kevin/code/Flapjack/shared/src/iosMain/kotlin/energy/octopus/octopusenergy/viewmodel/iosBinding.kt
for the following code
abstract class MoleculeViewModel<UiAction : Any, ViewState : Any> {
/**
* Ingest a [Flow] of [UiAction], react to those actions, and produce a [ViewState].
*/
@Composable internal abstract fun viewState(events: Flow<UiAction>): ViewState
}
fun MoleculeViewModel<...>.subscribe(...) {
...
val flow = coroutineScope.launchMolecule(RecompositionClock.Immediate) {
this.viewState(events.consumeAsFlow())
}
...
}
The full stacktrace is in the thread. It’s looking like an upstream NullPointerException
?eygraber
11/30/2022, 5:42 AMInternal error in body lowering
back end IR errors.
Is the project in a state where bug reports would just be noise because it's still experimental, or would they be helpful. If the latter, what is the best place to report them (Kotlin youtrack or compose-jb issue tracker)?Kirill Grouchnikov
11/30/2022, 2:12 PMmikehearn
11/30/2022, 3:19 PMmikehearn
11/30/2022, 3:22 PMColton Nohelty
12/01/2022, 1:50 AMeygraber
12/01/2022, 1:57 AMkotlinCompilerPlugin
property. Is that accurate?
e.g. if I set that property to androidx.compose.compiler:compiler:1.4.0-alpha02
would I be able to update Kotlin 1.7.21 in my jetbrains compose project?Colton Idle
12/01/2022, 3:50 AMKirill Grouchnikov
12/01/2022, 3:18 PMeygraber
12/02/2022, 12:01 AMverticalScroll
doesn't work in js?eygraber
12/02/2022, 4:09 AMPointerButton
isn't mapped to the values that Compose expects it to be on Ubuntu with an MX Master 3 mouse.
I'd greatly appreciate it if anyone could try this Modifier with other combinations of mice and OSes and report if they have similar or different results 🙏
Modifier
.onClick(matcher = PointerMatcher.mouse(PointerButton(0)), onClick = { println("Mouse Left") })
.onClick(matcher = PointerMatcher.mouse(PointerButton(1)), onClick = { println("Mouse Right") })
.onClick(matcher = PointerMatcher.mouse(PointerButton(2)), onClick = { println("Mouse Middle") })
.onClick(matcher = PointerMatcher.mouse(PointerButton(3)), onClick = { println("Horizontal Scroll Right") })
.onClick(matcher = PointerMatcher.mouse(PointerButton(4)), onClick = { println("Horizontal Scroll Left") })
.onClick(matcher = PointerMatcher.mouse(PointerButton(5)), onClick = { println("Mouse Back") })
.onClick(matcher = PointerMatcher.mouse(PointerButton(6)), onClick = { println("Mouse Front") })
.onClick(matcher = PointerMatcher.mouse(PointerButton(7)), onClick = { println("Mouse Thumb") })
Alexander Maryanovsky
12/02/2022, 3:57 PMRyan Smith
12/03/2022, 5:26 PMPablo
12/04/2022, 10:55 PMmikehearn
12/05/2022, 11:26 AMPablo
12/05/2022, 8:29 PMAlex Styl
12/06/2022, 1:38 AMnotarizeReleaseDmg
on a github action. The gradle task always hangs in the createReleaseDmg
part. I removed the signing block in the build.gradle.kts part and the build works without an issue. Not sure how to debug this.
Locally I can create the dmg, sign and notarize it using the notarize dmg task without a problem
I understand this is not entirely compose-desktop related but maybe others faced this issue before, and maybe you can give some ideas.Anmol Verma
12/06/2022, 5:29 PMCasey Brooks
12/06/2022, 7:49 PMSlackbot
12/06/2022, 11:41 PMPablo
12/07/2022, 5:03 PMayodele
12/07/2022, 8:58 PMPointerEventType.Move
is always called even if the mouse is not moving?enighma
12/07/2022, 11:07 PMGuilherme Delgado
12/07/2022, 11:16 PMProcessBuilder
. It “works”, but the output is different if I run the same command via terminal:
~ adb shell am broadcast -p com.sample -a sample.action -e "extra" "bla bla"
produces (correctly):
Broadcasting: Intent { act=sample.action flg=0x400000 pkg=com.sample (has extras) }
Broadcast completed: result=0
but the same command via ProcessBuilder
produces:
Broadcasting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x400000 pkg= -p }
Broadcast completed: result=0
any idea why? 🤔eygraber
12/07/2022, 11:45 PMjsNativeMain
source set come from in the Jetbrains compose repo?