« first day (4315 days earlier)      last day (629 days later) » 

6:38 AM
what's rs?
 
 
3 hours later…
10:06 AM
nerds i have a question
I have a class for the view state ScreenAViewState that has val isLoading I also have ScreenBViewState that also has val isLoading and some other common stuff
I also have ScreenAViewModel and ScreenBViewModel that guess what have some common methods
now ScreenAViewState and ScreenBViewState are data classes and I use .copy to change the values
so because they are data classes I cannot create something like BaseViewState
to pass to the BaseViewModel
HELP!
 
can you create an interface?
 
for which one? State?
 
inteface BaseViewState {
    val isLoading = false
}
 
yes
but i'd still have that duplication in the VM
 
what kind of duplication?
 
10:16 AM
as BaseViewState will not have that copy method
class ScreenAViewModel() : ViewModel() {
private val _state = MutableStateFlow(ScreenAViewState.Empty)
val state: StateFlow<ScreenAViewState> = _state

fun hideLoading() {
_state.value = _state.value.copy(isLoading = false)
}

//some other methods
I use it like this
that hideLoading will still be in the VM
I guess
I'd like to create a baseviewmodel that will have common stuff like hide/show loader as an example
but i don't think there's a way to let the BaseVM if I pass the state to it
private val _state = MutableStateFlow(ScreenAViewState.Empty)
val state: StateFlow<ScreenAViewState> = _state
so if I pass this state
that state is a data class and can call copy on it
 
ah i see
nope copy method is generated for each data classes separately
 
maybe I can create my own data class
I'm thinking
like a class but with copy methods
 
yeah you can do that
 
is this a solution?
i mean is there another one haha
 
i would be fine with code duplication tbh
i dont like base ViewModels/BaseState
 
10:25 AM
why?
:D
 
ViewModel is abstraction on its own, im not sure what would i put in by BaseViewModel that would make sense for all view models in an app
 
as an example i have the logout request
or an api request in multiple screens
is basically the same method in a lot of vms
 
hm yeah
im not sure what would be the best approach here tbh
 
will think about it
there is the shared vm concept
but idk if that works
because of the states
 
11:12 AM
Greetings!
 
 
2 hours later…
1:04 PM
What is this?
 
Jun 25 at 9:19, by Tim
Apr 28, 2020 at 13:29, by grrigore
just paste random photo chat
 
Tim
2:04 PM
xD
 
man
what is rs?
 
Tim
runescape
 
oh
 
Ribbit
 
do you nerds use detekt?
 
Tim
2:09 PM
can't remember the last time I did something, so I guess not
2
 
I don't, bout I'm not a nerd, so 🤷‍♂️
 
xD
how's life
 
Those stuff generally flag my perfectly good code as bad, so for me they're trash
 
haha
you got a point
 
loll
 
2:16 PM
yoo
 
@Tim m8 are u ok
 
the man the myth the legend
he fine af
 
Tim
yeah just waiting for retirement that's all
 
it's been years :(
 
2:17 PM
what s your spirit animal?
 
hmmm
probably my cat
he's super needy
what about you?
 
hmm
sloth?
 
i feel that
 
or tiger idk
horse?
stupid question
 
my spirit animal is you being unable to decide on your spirit animal
 
2:37 PM
bb you might like kennyhoopla
check him out
 
some artist?
 
2:58 PM
Hello, Android!
@ballBreaker mine too!
 
 
2 hours later…
5:14 PM
o/
I keep forgetting to join :(
 
6 days until surgery
 
5:29 PM
oh wow that's coming up quick!
 
you excited/nervous?
 
a little nervous
not excited
just want to get past this stupid injury
 
yeah I feel that
I know exactly how you feel
 
6:36 PM
@ballBreaker yes
@CarlAnderson all the best carl
 
blogpost about daily standups at smallpdf
super cool stuff
 
interesting
do you guys share arch stuff? or code related stuff
 
yeah
mine is coming in the following weeks, its about kotlin generics
next one is going to be opinionated guide to testing
later on i can write about arch stuff
 
nice
cannot wait
 
7:14 PM
o/
 
Having story-oriented standups doesn't matter if your management isn't competent
 
@grrigore I wanna share my flutter project to those interest but it has to be discrete
 
@MwBakker well i barely get to know flutter but understand some else's code haha
but if you want to you can share
 
ok lemme google how to share private git correctly
gonna need your gitname
 
7:33 PM
guess it haha
 
ok
 
got it
i m in
big project
:D
 
7:54 PM
put a lot of hours in it
 
 
1 hour later…
9:13 PM
@CarlAnderson yeah, and it requires a lit bit of practice
@MwBakker i wouldnt mind taking a look
 

« first day (4315 days earlier)      last day (629 days later) »