chanjungskim
01/03/2023, 2:58 AMchanjungskim
01/03/2023, 2:58 AMchanjungskim
01/03/2023, 2:58 AMchanjungskim
01/03/2023, 2:59 AMkenkyee
01/03/2023, 12:12 PMchanjungskim
01/03/2023, 12:49 PMFred Bowker
01/03/2023, 8:18 PMyusufariturk
01/04/2023, 6:40 AMcharbgr
01/04/2023, 11:50 AMapp
module?Michael Bichlmeier
01/04/2023, 2:49 PMBuild.VERSION.SDK_INT < VERSION_CODES.TIRAMISU
Something like:
fun shouldShowCustomAcceptPushesDialog() : Boolean {
contract {
returns(true) implies (Build.VERSION.SDK_INT < VERSION_CODES.TIRAMISU)
returns(false) implies (Build.VERSION.SDK_INT >= VERSION_CODES.TIRAMISU)
}
return Build.VERSION.SDK_INT < VERSION_CODES.TIRAMISU
}
Can someone help me what I’m doing wrong here: unsupported construction
🤷chanjungskim
01/05/2023, 7:06 AMRemi Latapy
01/05/2023, 10:18 AMandroidx.paging:paging-common:3.0.0-alpha08
publicly published somewhere? I can only find the alpha03
https://androidx.tech/artifacts/paging/paging-common/3.0.0-alpha08-source/androidx/paging/CachedPagingData.kt.html
I was wondering why the cachedIn
extension is using shareIn
with SharingStarted.Lazily
strategy (and not WhileSubscribed
) making the flow potentially active too much (compose/room/paging context). In this alpha08, the implementation changed and don't use shareIn
anymore 🤨Ciox
01/05/2023, 12:58 PMerror: <identifier> expected
kotlin.coroutines.Continuation<? super dev.ciox.insyder.data.models.new.PostRemoteResponse> continuation);
My ApiService
interface ArticleApiService {
@GET("/api/posts?populate=%2A")
suspend fun getAllArticles(): PostRemoteResponse
}
Retrofit provider
@Provides
@Singleton
fun provideRetrofit(okHttpClient: OkHttpClient): Retrofit = Retrofit.Builder()
.baseUrl("<http://localhost:1337/>")
.client(okHttpClient)
.addConverterFactory(MoshiConverterFactory.create())
.build()
Dispatchers Provider
@Retention(AnnotationRetention.BINARY)
@Qualifier
annotation class MainDispatcher
@Retention(AnnotationRetention.BINARY)
@Qualifier
annotation class IODispatcher
@Retention(AnnotationRetention.BINARY)
@Qualifier
annotation class DefaultDispatcher
@InstallIn(SingletonComponent::class)
@Module
object CoroutinesModule {
@DefaultDispatcher
@Provides
fun provideDefaultDispatcher(): CoroutineDispatcher = Dispatchers.Default
@IODispatcher
@Provides
fun provideIoDispatcher(): CoroutineDispatcher = <http://Dispatchers.IO|Dispatchers.IO>
@MainDispatcher
@Provides
fun provideMainDispatcher(): CoroutineDispatcher = Dispatchers.Main
}
chanjungskim
01/05/2023, 3:04 PMSuraj Bokey
01/05/2023, 3:40 PMobject
class using Mockito
. Tried the same with Mockk
it’s working.
Anyone tried doing this with Mockito
?the great warrior
01/05/2023, 4:48 PMdongwookhan
01/06/2023, 5:48 AMTower Guidev2
01/06/2023, 11:17 AMactor(start = CoroutineStart.LAZY, context = actorJob, capacity = Channel.UNLIMITED)
) and simply pass a block of code from each of my
modules ViewModels that extend my base ViewModel...Lukas Anda
01/06/2023, 1:58 PMMohammedAmleh
01/08/2023, 7:27 PMYoshio Schermer
01/09/2023, 8:03 AMAmrJyniat
01/09/2023, 9:38 AMA
class like this:
data class A(val listOfB: List<B>)
And B
is a sealed interface which has multiple children like this:
sealed interface B
object C: B
object D: B
.....
Ok, now I have a list of A
and each item holds a list of B
, what I want is to return the A
list contains only the C
items in each B
list.
I mean that I want to remove each item that isn't C
from each B
list in A
list
What is the straight forward way to do that?Jayalakshmi Android
01/09/2023, 12:29 PMBagadeshkumar R
01/09/2023, 2:42 PMscana
01/09/2023, 5:06 PMExampleStartupBenchmark_startupNoCompilation
timeToInitialDisplayMs min 1,028.6, median 1,072.3, max 1,117.2
ExampleStartupBenchmark_startupFullCompilation
timeToInitialDisplayMs min 1,582.8, median 1,614.7, max 1,859.6
// I don't have any baseline profiles generated yet
ExampleStartupBenchmark_startupBaselineProfile
timeToInitialDisplayMs min 1,395.0, median 1,452.4, max 1,544.4
Why would CompilationMode.None
be the fastest one? I was expecting it to be slower than Full/Partial ones 🤔ivano
01/10/2023, 10:32 AMjean
01/10/2023, 2:19 PMwithContext(<http://Dispatchers.IO|Dispatchers.IO>)
but my concern is on the coroutine scope. Does Room guarantee inserts or is it possible that it doesn’t go through if the insert is done from a viewModelScope
for example and the view is destroyed at the same time? Should I even consider using WorkManager
to be sure my inserts work even if the app is killed?Omkar Amberkar
01/10/2023, 4:02 PMOmkar Amberkar
01/11/2023, 2:04 PMhiltViewModel()
manually? How does onCleared()
gets called when a destination gets popped off the back stack with hiltViewModel()
? (edited)Omkar Amberkar
01/11/2023, 2:55 PMhiltViewModel()
manually? How does onCleared()
gets called when a destination gets popped off the back stack with hiltViewModel()
in compose?