andodeki
09/30/2021, 10:02 AMIgor Brishkoski
09/30/2021, 1:44 PMkotlin.Result
and trying to come up with a solution to backport it to java since it doesn’t really have good support. I have a simple Java class to kinda mimick the behavior, but kotlin.Result
get’s double wrapped and throwing ClassCastExceptions
. I’m wondering if I’m missing something or it’s just some weird bug.
https://gist.github.com/igor-brishkoski/4df636445358f85ca40d22e02b4a9b2dAndré Thiele
09/30/2021, 5:29 PMMatthew Laser
09/30/2021, 6:51 PMkotlin-reflect
to see parameter names of java methods? the stubs in the IDE show the parameter names, so I assume they should be accessible in some way (?)Vivek Modi
09/30/2021, 7:41 PMsentAt
property. I want to compare latest time and move block accordingly to that. Right now in my json there is 4 items/block but it could be more. Can some one know how to filter list and modify in efficient way. Also i need to convert sentAt
value in time and date format and store in other variable. The format of todays date will be in time
and if date is old i need in date
format.
Added Data class
ConversationsResponse
data class ConversationsResponse(
val conversations: List<Conversations>? = null
)
Conversations
data class Conversations(
val id: String? = null,
val title: String? = null,
val lastMessage: LastMessage? = null
)
LastMessage
data class LastMessage(
val id: String? = null,
val text: String? = null,
val sentAt: String? = null
)
Hovhannes
10/01/2021, 9:28 AMfor (i in 0 until domainList.size) {
mainViewModel.fetchVbtopUrls(concatenated)
mainViewModel.vbtopurl.observe(this, { it2 ->
when (it2.status) {
Status.SUCCESS -> {
if (it2.data != null) {
break //error
}
}
}
})
}
Hovhannes
10/01/2021, 1:22 PMBharath Malviya
10/02/2021, 7:19 AMappleobject
10/02/2021, 9:02 AMSlackbot
10/02/2021, 3:50 PMBrian Donovan
10/03/2021, 2:41 PMBrian Donovan
10/03/2021, 2:42 PMVivek Modi
10/04/2021, 10:49 AMVivek
or Dr. Vivek
lastName Modi
private fun getInitials(firstName: String?, lastName: String?): String {
var initials = ""
if (firstName != null && firstName.isNotEmpty()) {
initials += firstName.take(1)
}
if (lastName != null && lastName.isNotEmpty()) {
initials += lastName.take(1)
}
return initials
}
For example Vivek Modi
output VM
but when i enter Dr. Vivek Modi
i want VM
shahroz
10/04/2021, 1:24 PMAny
wont.Pemba Tamang
10/04/2021, 1:44 PMSlackbot
10/05/2021, 10:18 AMLilly
10/05/2021, 6:33 PMByte/UByte
(unsigned types partial stable since v1.5) instead of Int
? I deal most of the time with values in the range of 0-255. I'm also thinking about the architecture of the cpu (cpu natively works better with Int
while there might be extra steps to convert from Byte
to Int
???) but tbh, I'm not so deep in this topic. This question might be a no brainer but anyway I'm curious about the pros and cons if there are any.Napa Ram
10/06/2021, 6:46 AMluke_c
10/06/2021, 8:36 AMTomas Kormanak
10/06/2021, 11:07 AMSergio C.
10/06/2021, 1:58 PMUmar Ata
10/06/2021, 7:15 PMTallal Tasawar
10/07/2021, 2:05 AMslartus
10/07/2021, 5:13 AMMichael Langford
10/07/2021, 4:05 PMRavin Jain
10/08/2021, 1:13 AMviewModelScope
as a constructor injection through hilt to other classes which are viewmodelscoped
Roy Owor
10/08/2021, 2:39 AMInk
10/08/2021, 11:55 AM<queries>
<package android:name="kl.mobile.myapp" />
</queries>
but it doesn't work on Android 11. What I forgot to add?
On Android 9, 10 it works
https://developer.android.com/guide/topics/manifest/queries-elementLilly
10/10/2021, 3:38 PMrepeat
. In the first place it's not clear what a return@repeat
does. I would expect it leaves the iteration but instead it skips the iteration. AFAIK it's not possible to escape from repeat
??!! And I guess the name does not implicitly tell that the repetition has to be finished. A repeatUntil
counterpart would help here. Another example where a return
is missleading: map
, mapValues
, mapKeys
, associateBy
, associateWith
etc.
Here I would expect that a return
skips the current item, but instead the return
gets part of data (Unit
). Some ..NotNull
counterparts would help here. What do you guys think about that?AmrJyniat
10/10/2021, 6:22 PMdataStore Preference
*synchronously*(one-shot) without delay?AmrJyniat
10/10/2021, 6:22 PMdataStore Preference
*synchronously*(one-shot) without delay?Rajput Art Studio
10/10/2021, 7:58 PMK Merle
10/10/2021, 8:13 PMFrancesc
10/10/2021, 10:59 PMAmrJyniat
10/11/2021, 7:00 AMSharedPrefrence
with dataStore
to optimize the process but actually you miss very basic requirement like this!Zun
10/11/2021, 11:33 AM