Lukasz Kalnik
08/22/2022, 1:58 PMalthaf
08/23/2022, 7:28 AMclass VerifyAppIntegrityUseCase(
val authRepository: AuthRepository,
val workbenchUserRepository: WorkbenchUserRepository,
val menuRepository: MenuRepository,
val subscriptionRepository: SubscriptionRepository,
val adkarRepository: AdkarRepository,
val securedKeyValueStoreRepository: SecuredKeyValueStoreRepository,
>>> dispatcher: CoroutineDispatcher
) :
AuthenticatedFlowUseCase<Unit, Unit>(authRepository, dispatcher), UseCaseScope
class VerifyAppIntegrityUseCase(
val authRepository: AuthRepository,
val workbenchUserRepository: WorkbenchUserRepository,
val menuRepository: MenuRepository,
val subscriptionRepository: SubscriptionRepository,
val adkarRepository: AdkarRepository,
val securedKeyValueStoreRepository: SecuredKeyValueStoreRepository,
>>> val dispatcher: CoroutineDispatcher
) :
AuthenticatedFlowUseCase<Unit, Unit>(authRepository, dispatcher), UseCaseScope
why would kotlin give such a dual option here, both options allow us to pass it to the Super class constructoraungbophyoe
08/23/2022, 9:00 AMKashismails
08/24/2022, 5:38 AMManuel Lorenzo
08/24/2022, 8:16 AMJerome
08/24/2022, 10:51 AMJoe Altidore
08/24/2022, 1:56 PMkotlinx.serialization.SerializationException: Class 'SmallPersistentVector' is not registered for polymorphic serialization in the scope of 'PersistentList'.
Mark the base class as 'sealed' or register the serializer explicitly.
this is the data class:
@Serializable
data class Ngo(
val data: PersistentList<NgoData> = persistentListOf()
)
@Serializable
class NgoData(
var companyId: Int,
var country: String,
var createdAt: String,
var gallery: Gallery,
var id: String,
var mission: String,
var name: String,
var organisationType: String,
var picture: String,
var pictureUrl: String,
var points: String,
var text: String,
var updatedAt: String
)
@Serializable
data class Gallery(
var gallery: List<String>
)
Mutlu Celep
08/24/2022, 2:55 PMBilly Newman
08/24/2022, 9:13 PMArjun Achatz
08/24/2022, 10:10 PMYuşa Zorlu
08/25/2022, 7:33 AMYasser AKBBACH
08/25/2022, 8:26 AMkoin
to hilt
, I'm stuck in the area where koin
passes parameters to the inject!
e.g:
val SomeClass by inject {
parameterOf()
}
What's the equivalent in hilt
Abhishek K
08/25/2022, 2:51 PMKundan926
08/25/2022, 3:08 PMHimanshu Rathore
08/26/2022, 4:39 AMDmitry
08/27/2022, 2:43 AMMohamed Fathy
08/28/2022, 8:04 AMfun <T> Single<Response<T>>.parseResponse(): Single<T> {
return flatMap { response ->
if (response.isSuccessful) {
if (response.body() != null) Single.just(response.body()) else Single.error(NoDataException())
} else {
Single.error(DataRetrievingFailException())
}
}
}
This is extension written with RxJava that takes Single
of Retrofit Response<Model>
(Single<Response<Model>>
) and check the state of it and then return Single<Model>
or error, This function supposed to be used in the data
layer.
Thanks in advance.Viral Thakker
08/29/2022, 10:38 AMNagaraja Sunder
08/29/2022, 4:03 PMAsad Mukhtar
08/30/2022, 5:28 AMste
08/30/2022, 7:32 AMAnand Verma
08/30/2022, 9:49 AMJsonDataException
and wanted to log api request + api response + parsing error.
How can it be done in right way.
In interceptor there is no way to log parsing error.
Using Retrofit 2.9.0 with coroutine suspend method so don’t have api metadata to log.
Kindly help herexxfast
08/31/2022, 5:43 AMkotlinx.parcelize
works differently with R8 optimisations
@Parcelize
data class Data(
val param: String? = null
){
val member: Bool = param?.isNotBlank() == true
}
for Data("someParam")
On debug variant, inspecting this member
property reads true
while on release variants this magically reads out false
.
However, when extracted to a extension with a backing delegate, it behaves the same on both variants
@Parcelize
data class Data(
val param: String? = null
)
val Data.member: Bool get() = param?.isNotBlank() == true
Is this a known issue?Slackbot
08/31/2022, 6:51 AMTravis Griggs
08/31/2022, 5:06 PMlistOf("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat")
I tried to use
DateFormatSymbols().shortWeekdays()
but that surprisingly returns an array of 8 values (so that Sunday can be accessed at 1 apparently). I could slice from 1..7, but that seems hacky. Is there a current idiomatic way to get a list of short weekday names?rkeazor
08/31/2022, 9:50 PMBradleycorn
09/02/2022, 1:57 PMLifecycle.whenResumed
vs Lifecyle.withResumed
? .. it seems like they both work the same way?James
09/02/2022, 4:58 PMJames
09/02/2022, 4:59 PMJames
09/02/2022, 5:00 PMJames
09/02/2022, 5:00 PM