electrolobzik
02/15/2024, 1:04 PMcoil
in a lazyList
I see lags during scrolling because image needs some time to load. Especially when I use VideoFrameDecoder. Does coil
cache the result in this case? If not by default is there any API to force it using cache? In this case I will be able to prefetch the items into cache.rkeazor
02/15/2024, 4:20 PMColton Idle
02/16/2024, 2:41 AMVaibhav Jaiswal
02/19/2024, 6:00 PM| id | referenceId | referenceType |
And according to the referenceType, i have to join on some specific table,
Also making sure, that any change in that child table emits the change when i query this table using
asFlow()
or return PagingData
Tudor Luca
02/20/2024, 5:12 PMAhmad Hassan
02/21/2024, 9:05 AMTolriq
02/21/2024, 7:51 PMsourcePath { srcProject()}
?Tech
02/23/2024, 3:37 AMRETURNING *
syntax because of the autogen.
sqldelight {
databases {
create("Database") {
packageName.set("com.test")
deriveSchemaFromMigrations = true
dialect("app.cash.sqldelight:postgresql-dialect:2.0.1")
}
}
}
I define my table creations in the migrations
folder so as time goes on I just run all the migrations to get my table and then I define all my queries in the standard com.test
path.
The problem comes when I try to do something like
testQuery:
UPDATE SET Test WHERE id = :id RETURNING *
In the autogenerated code it fails to resolve the class Test
because that data class is being generated in the migrations
folder instead of com.test
.
Is there any way to fix this issue?Logic Gupta
02/24/2024, 10:55 AMitnoles
02/26/2024, 4:51 AMDatabase(androidSqliteDriver)
to be Runtime?Vaibhav Jaiswal
02/26/2024, 8:38 AMgenerateAsync.set(*true*)
, now I found out that the suspend function created are not main safe
As i am getting such ANR
Your app's code here results in the I/O call above. Code that triggers I/O operations should be moved out of the main thread.Stack Trace in thread
julioromano
02/28/2024, 9:58 AM@Test
fun `sample test`() = runTest {
launchMolecule(RecompositionMode.Immediate) {
// no-op
}
}
This the debug log:
After waiting for 1m, the test coroutine is not completing, there were active child jobs: ["coroutine#3":StandaloneCoroutine{Active}@c1a65a7, JobImpl{Active}@2fc7cf1d, "coroutine#4":StandaloneCoroutine{Active}@3b5b1500]
kotlinx.coroutines.test.UncompletedCoroutinesError: After waiting for 1m, the test coroutine is not completing, there were active child jobs: ["coroutine#3":StandaloneCoroutine{Active}@c1a65a7, JobImpl{Active}@2fc7cf1d, "coroutine#4":StandaloneCoroutine{Active}@3b5b1500]
at app//kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$2$1.invoke(TestBuilders.kt:351)
at app//kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$2$1.invoke(TestBuilders.kt:335)
at app//kotlinx.coroutines.InvokeOnCancelling.invoke(JobSupport.kt:1428)
at app//kotlinx.coroutines.JobSupport.notifyCancelling(JobSupport.kt:1473)
at app//kotlinx.coroutines.JobSupport.tryMakeCancelling(JobSupport.kt:796)
at app//kotlinx.coroutines.JobSupport.makeCancelling(JobSupport.kt:756)
at app//kotlinx.coroutines.JobSupport.cancelImpl$kotlinx_coroutines_core(JobSupport.kt:672)
at app//kotlinx.coroutines.JobSupport.cancelCoroutine(JobSupport.kt:659)
at app//kotlinx.coroutines.TimeoutCoroutine.run(Timeout.kt:156)
at app//kotlinx.coroutines.EventLoopImplBase$DelayedRunnableTask.run(EventLoop.common.kt:498)
at app//kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
at app//kotlinx.coroutines.DefaultExecutor.run(DefaultExecutor.kt:105)
at java.base@17.0.10/java.lang.Thread.run(Thread.java:840)
The project is using Android and Jetpack Compose, so only molecule-runtime is imported.
All libraries are updated to their most recent version as of now (though I also tried to downgrade molecule as well as compose and compose compiler but nothing changed).
It is most probably not molecule's fault as the same setup is working in many other projects of mine but I can't figure out what's wrong in this one.Sean Proctor
02/28/2024, 5:38 PMQuery
in SQLDelight at runtime? I'm trying to add a list of values to a temp table before the query is run. The query is then used in a paging source, so it needs to be a Query
.Tim Ortel
02/28/2024, 7:03 PMTrey
02/29/2024, 4:57 PMColton Idle
02/29/2024, 10:46 PMtry {
client.newCall(request).execute().use { response ->
if (!response.isSuccessful) return@withContext
val bufferedReader = BufferedReader(InputStreamReader(response.body!!.byteStream()))
persistence.deleteAllThenInsertAll(bufferedReader)
appStateHolder.updateLastDbSync(System.currentTimeMillis())
}
} catch (e: Exception) {
// Network issue
}
Does that look sus to anyone?youssef
03/01/2024, 9:52 AMadte
03/01/2024, 8:10 PMRafs
03/02/2024, 3:58 AMColton Idle
03/05/2024, 3:35 AMsuspend fun doTransaction(
bufferedReader: BufferedReader,
onSuccess: suspend () -> Unit
) = withContext(Dispatchers.IO) {
var currentLine: String? = null
try {
myQueries.transaction {
afterCommit {
Sentry.captureMessage("Transaction completed with ${myQueries.getCount().executeAsOne()}")
onSuccess()
}
...
Myans
03/07/2024, 11:13 AMEmanuel Moecklin
03/07/2024, 4:23 PMapp -> uses Anvil
|--- library a -> doesn't use Anvil
|--- library b -> uses AnvilEven when we enable Anvil in library a, modules generated for library b aren't included in the app and the app crashes. We don't want to add every single library to the app module directly so is there a way to have transitive dependencies with Anvil?
Tech
03/10/2024, 7:07 PMHristijan
03/11/2024, 10:44 AMSlackbot
03/13/2024, 12:12 AMNuru Nabiyev
03/16/2024, 9:34 PMException in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: java/sql/SQLException
Does anyone know how to fix this? Googling this error hints that SQLight jar is missing, but doesn’t sqaure/cashapp handle it?yschimke
03/17/2024, 11:16 AMColton Idle
03/17/2024, 10:26 PMColton Idle
03/18/2024, 12:28 AMVlad
03/18/2024, 4:33 PM