« first day (3782 days earlier)      last day (1165 days later) » 
01:00 - 22:0022:00 - 00:00

1:28 AM
@asim Well, you'll either build a powerbank or a fire. Seems like a win-win.
 
 
3 hours later…
4:02 AM
o/
 
 
4 hours later…
8:16 AM
o_/
 
 
1 hour later…
9:41 AM
Synced starred message data. Took 121765 ms.
 
10:11 AM
Greetings!
 
yeah
 
10:39 AM
This was the most starred message last year on this day:
Feb 23 '20 at 13:57, by Taseer
I did not use ViewSwitcher, primarily for two reasons, one being that I have as of right now manage 3 views and the final reason is for future, maybe I might add more views. So, if I take in future context, then ViewSwitcher is not a viable option
 
11:30 AM
o/
@Tim do you listen to phoebe bridgers?
 
Tim
hu dat
 
12:04 PM
I got a "Great Answer" badge the first time.
 
Tim
sick
 
Phoebe Lucille Bridgers (born August 17, 1994) is an American singer-songwriter, guitarist and producer from Los Angeles, California. She made her solo debut with the studio album Stranger in the Alps (2017), followed by Punisher (2020) which earned Bridgers widespread critical acclaim and four Grammy Award nominations, including Best New Artist. Bridgers is also known for her membership in the musical groups boygenius (with Julien Baker and Lucy Dacus) and Better Oblivion Community Center (with Conor Oberst). == Early life == Phoebe Lucille Bridgers was born on August 17, 1994 in Pasaden...
she's got 4 grammies nominations
 
 
2 hours later…
1:56 PM
did anyone encounter FCM not sending push notifications error?
 
Tim
yeah
selling contents of ^ deleted message for $2
 
i make stupid mistakes when i am super tired
 
Tim
one of the mistakes could be to buy the contents of a deleted message you posted yourself, don't let dreams be dreams
@grrigore 7 mins in, very relaxing
 
2:19 PM
innit?
looks like some of the devices don't receive push notif
 
 
2 hours later…
4:21 PM
o/ morning
 
Tim
hi
 
heyo
 
How is everyone?
 
Tim
fucking tired
 
yeah same here
 
Tim
4:29 PM
my friend set up a dedicated server where we can all join when we want, but we are having some issues with dying and graves not appearing aka losing all our stuff
you ever had that?
it doesn't always happen
 
oh really?? I heard that can be a problem somewhere, but never experienced it ourselves
our major issue with our dedicated server is when all 5 of us are on it sometimes when you break something it doesnt give all the mats back, and sometimes when u throw something it flies off into th sky
 
Tim
xD
 
haha how many people are on your server?
5 seems to be the absolute max I would do for stability
 
Tim
about 17 minus 12
 
as soon as it hits 5 shit starts to hit the fan
oh wow
Daft Punk split up
no more daft punk
 
4:45 PM
can't relate
 
Tim
who
 
fair lol
u guys suck
the backstreet boys and nsync split up as well maybe you can relate to that one
 
Tim
5:01 PM
noooooo what say it ain't so
what about westlife doe
and any news on 5ive
 
IDK they keep coming back and forth
 
5:48 PM
o/
@Tim I loved that band
 
hey bakky
 
Tim
me too, when I was like 7 years old
 
Hey BB, Tim
 
whats goin on man
 
Tim
tell him about the app mw
 
5:55 PM
yeah talk to me about your car app mwb
how many boyfriends have you gotten that like ford cars?
It's a dating site for people who like fords, right?
 
n..no :(
didn't you see it on discord?
btw got a little drama over the last week
 
hahahah I'm just screwing around, I didn't see the latest progress
app is going well?
and ouu please share
(last I saw the app was looking real good mwb, don't listen to me I'm just teasing)
 
@ballBreaker yeah, had some queries to optimalize for putting the right filters
my app assumed that if you own a motorcycle, you'd like motorcycle events. But ofc those searching for a motorcycle also like to go there
or if you have a car event, but it's convertible only etc. but I got it figured out
@ballBreaker haha thanks, not that much changed since the last dashboard view. Small changes
@ballBreaker I'm dating a girl that I found out has many male friends of which one included is her ex
 
@MwBakker oh righteous man!! sounds like you're making some good progress on it :D
@MwBakker ohhh interesting... interesting... how close are they?
many male friends is almost always a bit of a red flag, or at least a yellow flag
 
It is BB, it is
But this was a girl that wanted to take things slow in the dating process which did great to my feelings for her
 
6:04 PM
posted on February 22, 2021 by Android Developers

Posted by Chet Haase, Developer Relations Engineer We recently finished another series of MAD Skills videos - this time on Motion Layout. We covered ways in which you can use the API and the design tool to create rich, custom, and complex animations for your users. Check out the episodes below to increase your knowledge and skills in different areas of the Motion Layout API an

 
@ballBreaker thanks, the solution is to give the user some of his own filters like "is interested in motorcycles" booleans. Ofc not too many I have 5 categories of vehicle types in total
the boolean is set to 'true' automatically once a user has registered one of these vehicle types himself
and events are now showen a total number, and an amount of events a user can put his own vehicle at
 
true
true
so about this drama
what's the drama part?
 
Drama?
👀
 
the drama is I open up to a girl and she is friends with her ex
 
o/
@AdamMc331 !!!
 
6:16 PM
@MwBakker that's not really ddrama haha
I mean that's a bit of a red flag but nothing too bad?
I'm friends with one of my exes
although context definitely matters
 
@CarlAnderson o/ !!!
I am trying to come back. Slowly popping in more.
 
I want to pick your brain Adam
 
It is also just an awkward time. Lot going on lately.
 
do you have a minute?
 
Sure! What's up?
 
6:17 PM
Are you familiar with Clean Architecture?
 
If you're referring to the book I have not read it but I am a little familiar with it.
 
@ballBreaker I dk the context, but the fact she told me everything in the wide and open could mean there are 0 intentions
 
@AdamMc331 something like this: medium.com/android-dev-hacks/…
 
@ballBreaker I have a bad experience with someone's ex hanging around as you had figured from my last 'relationship'
anyway how are you guys doing?
 
@MwBakker yeah I mean her telling you is a good step, that she's not hiding it. I'm not super close with my ex that I mentioned, but we're still friendly and have hung out a few times. But we also dated for like 5 years, bit different than if someone only dated for like a year or two and then became friends? IDK it definitely depends on why they broke up
 
6:19 PM
@CarlAnderson Yes. I've also written about this idea a bit: androidessence.com/mvwtf There's a video version too under the same name.
Your post goes a little further than I usually do - I haven't actually used UseCases in a project yet, but the more time passes the more I want to jump on the bandwagon haha.
 
@MwBakker yeah that's fair, it definitely depends on the context for that one I think, I don't think it's a black-or-white rule that if someone is friends with an ex that it's automatically a bad thing, kinda depends
 
yep. For one side I think I need to be convident enough to just deal with this, on the other side I might be very naive
 
That's basically where I'm at - I don't understand the point of UseCases
And I also am confused by "Repositories" that make network calls
 
So repositories I can explain.
The TL;DR is that any data request should be behind an interface. Because your VM shouldn't care where that data is coming from, just what it needs.

So for every set of network requests, I make something called like `ProfileRepository` and then I make the implementation with some specific naming convention maybe like `RetrofitProfileRepository` for example.
 
@CarlAnderson odd way to spell 'MVVM'
 
6:22 PM
That allows you to easily swap out retrofit for GraphQL in the future without changing a bunch of classes up stream. It allows you to provide fakes easily in unit tests as another example.
 
@MwBakker it's more than just MVVM
 
Yeah these concepts extend beyond MVVM. They can be used with any of the broader patterns.
 
I guess my main beef is with the name "Repository"
Repositories in my mind imply mindless data stores
But I can't think of a better name off the top of my head
 
What do you mean by "mindless"?
 
POJOs... no business logic
 
6:25 PM
One could interpret a repository as just that.
 
the only logic a Repository should have in my mind is whether there's caching or what sort of data storage there is (room vs mysql, etc)
 
I typically have my repositories return data classes with no extra fluff, and then inside the ViewModel I map the response into something UI friendly.
 
@CarlAnderson isn't 'usecases' some sort of synonym for 'services'? When reading that article I see UseCases doing things I usually put in service classes
 
So I think you are interpreting it "correctly". Maybe you've just seen some examples that didn't do it that way. but that is my understanding too.
 
it should never involve a network call... something else should run network calls and populate the data into the repository
 
6:26 PM
Ooooo now I'm following you.
 
all of the examples I've seen involve having the repository make network calls
 
@MwBakker Yeah that makes sense, do you know the story with her ex at all? you should ask her
 
I didn't see it that way because I think a "remote repository" is valid, but you're viewing repository as a local storage concept?
 
and the Grove client also does the same - network calls in the repository
yeah
 
Gotcha. I think that is the difference here. Your understanding of a repo is correct but I don't see that as limited to local stuff.
 
6:27 PM
@ballBreaker they had been dating for a few months, it was her collegue and now it's a friend that lives about 300m from her drinking coffee with her regularely
 
But you can do it that way, of having network requests populate something locally. Actually, that's what the library Store by Dropbox is trying to solve.
 
@MwBakker oh interesting, did she say why they split?
 
@CarlAnderson image not found for me
 
@AdamMc331 if you click on it does it show?
ugh.. no
 
@ballBreaker no she didn't mention that, I also wasn't really into these stories I had different intentions haha so I didn't ask
 
6:29 PM
@MwBakker I think Services can be a little confusing depending on context. But, in some examples, they might be synonymous.
 
I have more to say on UseCases but I don't wanna have parallel discussions so I'll go to that after we are done talking about repos
 
I guess it sort of makes sense if you think about it that way, but it's still unsettling for me
 
Yes this is how I see it, with Remote Database and Local Database kinda being optional/interchangeable. Your app could talk to one or both of these sources, and as long as those sources are behind an interface, that's the key point of keeping it "clean".
 
The places that store data shouldn't mix network calls in with it
 
6:32 PM
@CarlAnderson is it one repository class? I have Database Classes for every model to retrieve the data and perform queries, does every model get its own repository class?
 
Yeah I think the right thing to do is like, one class for network requests, one class for storage, and then you have another class that depends on both, and it does the "fetch & store" scenario maybe?
 
yeah
anyway, it's something I can adjust to or plan for
but tell me the argument in favor of UseCases
 
Definitely. :)
 
because so far they've only been wrappers around calls to the Repo
 
I think that's what it boils down to.
This is the best article I've found on use cases yet: https://proandroiddev.com/why-you-need-use-cases-interactors-142e8a6fe576

*HOWEVER* I'm still not sold on them, because it just feels like unnecessary wrappers.
 
6:33 PM
@MwBakker haha fair enough. If you wanna actually date her tho you should probably find out the story
 
That was how I felt too and I didn't see the value in them.
Feels like FizzBuzzEnterpriseEdition to me
 
I think it _can_ be useful on complex screens, though. For example the home page in my new app does a ton of different stuff, it depends on like three different repositories, and right now my ViewModel has like 10 different parameters.

I think splitting it up into smaller "use cases" would keep the VM from becoming a God class.
And so I think we have to walk that particular line. If my screen makes one single network request, it's exactly that FizzBuzzEnterpriseEdition LOL.
 
Yeah maybe it's a question of how complicated/large your VM becomes
 
But on a screen that does a lot of different things, it could be a good way to split it up. Which is maybe what @MwBakker meant by services.
 
@MwBakker sorry, yes that's how it's set up, many repositories depending on the data source/classification
 
6:35 PM
My architecture hot take is that it's okay to occasionally mix these things.

Like, if screen A/B/C are simple loading/content/error screens, it's fine to just use the repo directly.

If screen D does a lot of different things, then make use cases for that screen. I understand a lot of people care about consistency (and I do too), but I also care about not over engineering until necessary.
 
@ballBreaker you're right, but I dk if I am objective enough to look at this sober
 
Yeah I'm in a place where I want to learn about all these patterns and use them and become familiar with them, while at the same time, my app is very very simple and it feels a bit like overkill.
 
@CarlAnderson so repositories are database classes or is this too simplified?
 
@MwBakker I view them as "in-memory data holders that know how to retreive and store the data if it's not available when requested"
so it might be on top of a database, or it might just be a front for a network call
 
I see, thanks
 
6:40 PM
@MwBakker yeah fair, if it's not something you could get over then move on to someone else who isn't friends with their ex I guess, but it's something you'll eventually need to work through
 
This is precisely why I often push people toward MVVM. I know that "Model-View-Intent" is a bit stricter, has better data flow, and is more clear and predictable. But to do it right requires a big learning curve.

MVVM is fine for 9/10 screens.
 
Async tasks is fine for 9/10 screens :D
 
/leave
 
@AdamMc331 MVVM on android costed me half a year extra on college before graduating, mostly my own fault of course bit still: tough stuff
 
:O
 
6:41 PM
MVVM is a big learning curve TBH
 
indeed
 
Yeah it can be for sure.
But I spent some time researching MVI for a talk and holy crap
 
I made a big boogeyman out of LiveData by trying to understand everything that was going on under the hood, and once I just accepted it as "this is an observable that survives configuration changes" and moved on it was a lot easier.
 
If I can do a little selfish promo, on this topic, this video is actually my favorite presentation I've ever given: youtube.com/watch?v=T7A-JbJBjyg&t=2s
I think it's one of the most clear, well organized, and really takes a complicated topic and breaks it down into understandable bits for people to decide what's best for their projects.
 
I'll go watch that later
I've seen you link it before
 
6:44 PM
and by some stroke of weird luck, I'm wearing the fleece that I have on in that video LOL
 
Architecture is such a complicated topic.
 
glad you dropped in to talk about it
and yes, it is
 
@AdamMc331 it's always weird to see the person behind the text chats revealed
 
I actually think it breaks down to one specific idea: avoid hard dependencies. Do this through interfaces, and splitting up responsibilities so that you can swap things out.
How you do all that can vary, but if you keep that core concept in mind, your codebase is gonna be infinitely better than not thinking about it at all.
Also! You'll see a joke appearance from @Mauker in my slides of that talk!
 
6:46 PM
I see this passing by: model.getData() but that means just getting model data and not database data right?
 
Well, Android complicates things in two ways: LifeCycle killing classes, and Unit testing not able to access Android OS code
 
^^
oh man see you're gonna love this talk
 
Thus the architecture patterns that work elsewhere don't work in Android
 
because I address both of those topics at some point
 
also shifting priorities at work might mean this is my last month of Android programming this year D:
 
6:48 PM
This YEAR?! It just started?!
 
yep
NDA - can't discuss the details
 
Shoot. By the time you come back we might all be on Compose and have to relearn everything.
 
or Fuschia :joy:
 
Sorry to ask because I've been gone for so long but where are you at now? IIRC you're no longer at Big Fish Games?
 
I got laid off in September from Big Fish
went to a startup that was abysmal in November
quit after 5 weeks
now I'm at Grove Collaborative
 
6:49 PM
Nice. :)
Ya know I was thinking about you recently because I started playing chess again. I'm abysmal at it but I remember when this chat room was on a chess binge and we played a few times.
 
ha
I played exactly one game in the past year and got absolutely wrecked
 
The problem with chess sites is the default rank they put you at is... not really beginner. So the first two days I just lost every single game.
Now that my rating is like 600 I actually play people who also make stupid blunders.
 
I'm glad I stopped by too. Trying to come in a little more again. I miss y'all.
 
you heading out?
 
6:52 PM
Nah still here just being sentimental lmao
 
:)
can't believe I've been around here since 2013
 
To be honest I did not handle the last year well at all. I basically did the bare minimum to get by for several months. Only recently am I starting to get a little more like my normal self again.
 
2020 was a wrecking ball at life
 
Yeah.
 
I think bare minimum is something to be lauded
 
6:54 PM
March is next week and I'm still processing last March lmao
Yeah and as you know changing jobs in all this is not easy. I've been happy with the new place and it's exciting to have built an app from the ground up, but still an awkward experience starting a job remotely.
 
yeah for sure
and at Grove I'll be 100% remote even after the pandemic ends
 
I will say though, after thinking about how much of my life I've spent commuting, I don't wanna go back to an office. Especially when I'm moving soon and will have an office room in the new apartment so I won't have to work next to my bed lmao. So I'm hoping I can push more a fully, or at least mostly, remote setup in the future.
I'd be happy to meet my team, maybe do an offsite or a happy hour to see face to face, but not feeling the need to commute to work anymore.
 
yeah I've been thinking about whether living in Seattle in the long term is a good idea or not
 
lol so if I knew what was really coming I would have considered moving back into my parents for a year.
 
6:58 PM
But the pandemic has actually made me realize how much I miss the city energy, and I want to stay here and enjoy it for a few more years. But I don't wanna grow old here lol.
I saw someone phrase it as "I can't believe I'm homesick about a city that I'm living in" and that really struck me.
 
huh
interesting
 
The last time I ate at a restaurant was March 14, 2020. I have barely been outside since then.
 
I mostly just miss playing volleyball
I've had more game nights this past year than any of the prior ones
 
I have done a couple things, walks in the parks for example. I also bought an electric scooter so I can go between here and my girlfriend's apartment without having to use public transit.
 
nice :D
 
6:59 PM
The first couple times of using it in the city was scary - thought I was gonna die one of those comedic deaths where someone opens a car door without seeing me and I go flying down the street. Hasn't happened yet.
 
haha
yeah that's actually a very common way for people to get into motorcycle accidents in my city
I know 3 different people who've gotten into an accident from that alone
 
oh wow
A lot of NYC has designated bike lanes that aren't right next to cars, but there are spots where they can't help it.
Right outside my apartment the bike lane is separated from the road a little bit, and when it snows really bad they have small plows that come to do just the bike lane.
 
yeah fair, you're not really suppose dto use bicycle lanes with motorcycles tho
at least here
not sure about electric scooters
@MwBakker I forgot that I had drama for you!!!
I got banned from tinder last night lmao
in kind of a hilarious way I think
 
LOL what'd you do?
So my electric scooter is like one of those kick scooters, so it's not made for being in traffic. It also doesn't go very fast - 12mph/19kmh
 
honestly I'm not 100% sure, but I had a suspicion that I was 'shadow banned' from tinder for about the past 6-12 months. I kept remaking accounts and deleting them to kinda game the system, and about a year ago it stopped working and my account started REALLY going down hill (very few people liking me, I wasnt shown anyone attractive, my matches would all stop talking after the first day of having my account, etc). So I made an account yesterday and matched with a girl that I know IRL.
we talked for a bit and then she just stopped responding. She messaged me on IG and is like "did you get banned? you literally unmatched me while you were typing" but on my end she was still a match, and on her end I was gone... so shadow ban confirmed
 
7:10 PM
So when's the date?
 
@ballBreaker yoo haha do tell!
 
I emailed tinder telling them I have confirmation that a match doesnt have me/aren't receiving the messages anymore, so they tell me to try again and I should get their anti-spam "are you a human" test
I log back into tinder and I was banned permanently for good lmao
 
@ballBreaker this happens? wtf?
 
so I emailed support back being like "I did the test and then got instantly banned?" and now they just keep sending me their boilerplate "we understand you were banned, ther eis no appeal process"
 
@ballBreaker hahah "get F BB-b-b-yyyeee" - Tinderteam
 
7:11 PM
@NeoWakeup Welcome to room-15! Please read the rules before chatting. :)
 
hahahaha yep exactly
so they dealt with my shadow ban by giving me a full ban
RIP
 
that's messed up
so what about the girl IRL?
 
So idk if y'all remember but I worked for OkCupid, also owned by Match Group. And I actually miss it a lot.

Leaving a job I liked was not something I'd every experienced before. Usually I wait until things go to hell, but leaving a good opportunity for a better one was weird lol
 
aww that sucks adam, yeah I do remember you working for okcupid, I came on here a bit ago to yell at you about match group (not that you even would care haha, I just needed somewhere to rant)
But yeah that really sucks man, at least you got out before match group completely ruined it xD
you got to leave with all those good memories in tact
 
lol I haven't been gone that long I don't think they ruined much.
I mean at the end of the day no corporation is a good corporation lmao but I think Match does some cool stuff.
But I'm also biased - it's where I met my partner, so I'm a success story haha
 
7:28 PM
yeah fair ahaha
my experience with match is them ruining hinge and tinder
the hinge one gets me the most though, I loved that app
haha definitely a little salt there on that topic from my end
i just wish they didnt have a monopoly on dating apps
competition is way too necessary in this market
 
Yeahhhh that's fair
I felt the same
And it's weird because they don't really communicate a ton internally
so two match companies could be building the exact same feature and never know
so it's really just an umbrella company to cash in
 
Tim
mother fuck I missed the tech talk
 
@AdamMc331 yeah that makes sense, like I feel like each company on their own is good but.. yeah hinge used to be the least gamified of them all but it wasn't as profitable I guess so they changed it to a pay-to-win structure
and it's the worst of em all lol it has a curated list that learns off your preference and then puts your top candidates in there and locks them behind a paywall
and your regular/free queue is all filled with people you aren't attracted to
 
@AdamMc331 I can understand
I hope to find my company soon too
 
their app score in the store has dropped from a 4.7 down to a 3.3 in the past months since that change.. so maybe they'll be smart and revert it but who knows
 
7:34 PM
They show way too many fricken paywalls and I complained about that all the time
Someone internally once said "rather than squeezing every penny out of users, we should focus on becoming a service people are willing to pay for" and shit that changed the way I view consumer focused apps entirely.
 
yeah that's such a smart guy lol
or gal
 
Too many paywalls makes enough people resent you and it's not worth it. But people can and will pay if they believe your product will help them. So they just have to focus on making that product and building that trust
 
the things I bend over backwards to give my money are things that aren't paywalled but actually services that are worth the money
 
and the craziest thing is that wouldn't be hard! Millions of people find love online now, people use it because on some level we all know it works. So just, make the experience better lmao
 
yeah exactly dude!!
 
7:36 PM
especially from the established Match Group brands. Like OkC was already profitable.
 
I feel like there are a million other ways they could have made money from people rather than a strict paywall idk
 
I can understand like, finding clever ways to make money to get off the ground. I get that. But they weren't hurting for money. They could have used the resources they had for much better long term visions.
Also OkC copied so much from Tinder and that was its own thing I loathed.
 
piss off and scare off 75% of users to just profit from the gullible 25%
yeah that's true man
it seemed like once match bought them out they all kind of conglomerated into the same-type of pay structure
and the features started to blend and all be the same
people used OkC because they liked it, not becuase they wanted it to become a tinder lol
otherwise they would have used tinder lol like these separate markets exist
@Tim get rekt, nerd
 
yep exactly
@Tim It's okay I can start over :troll:
 
I guess their scheme was to just monopolize and that way if they didn't like it they'd just have to use one of your other apps lol
gotta love it
anyway im done ranting about that baha
how are you liking your job now adam?
 
8:05 PM
It's pretty good!
I built an app from the ground up. That was a really exciting opportunity.
 
oh nice dude!! I don't think I've ever had that opportunity at work LOL
all been existing apps w/ new features. that must have been awesome
I actually have an inbetween right now.. have an idea that was originally going to be it's own app, now it's going to be jerry-rigged inside our existing app to save on infra costs
@AdamMc331 did you lead the whole thing?
 
I did! I started solo and now I'm a team of 2. :)
 
ooooh nice man :D
that's exciting
Was that a first for you?
 
8:29 PM
@AdamMc331 the audio on this is really quiet
 
9:08 PM
Word
 
The Bird is the Word
 
9:46 PM
if I have a when statement in Kotlin based on an Enum, but don't want to do anything for one of the states, what do I write?
 
else -> { } I think
Well it depends on whether or not you have a return statement
 
yes, that's it, thanks
Adam
can I pick your brain again
 
Sure!
 
@Tim
 
I'm trying out the new Navigation scheme
I've got my navigation graph set up, and SafeArgs installed
 
9:48 PM
@ballBreaker Yeah! And I'm not really a "lead" in any official capacity, because our mobile team in total is only four people. The main iOS dev is our mobile tech lead. But if/when our Android team grows, there's opportunity for me there. But I am like the main code owner for the repo & stuff. I got to push the initial commit which was cool lol
 
so now I can in my Fragment, call findNavController().navigate(destination)
where destination is from the auto-generated FooFragmentDirections class
have you played with this at all?
 
@AdamMc331 That's really cool man! that's a nice direction to go :D happy for ya
 
Yep I use it in this project
 
so I didn't want my Fragments to really have to understand how to generate one of these direction objects
it felt like something the ViewModel should do / determine
so I created a BaseViewModel class
open class BaseViewModel: ViewModel() {
    var navigationCommand = MutableLiveData<NavDirections>()
    fun navigate(directions: NavDirections) {
        navigationCommand.postValue(directions)
    }
}
The FooViewModel can now call navigate(directions) and the BaseFragment will then get the nav controller and call the navigate command
 
Nice
 
9:52 PM
yep yep
 
is this a good pattern?
What I'm running into right now
is that I'm trying to add ViewModel state into one of my screens
it's a login screen
 
That's what I do, so I hope so! Just beware of the fact that MutableLiveData will hold on to the value, so like if your fragment is recreated, it could navigate unintentionally. If you're also using RxJava, consider like a PublishSubject or a Channel if coroutines
I think there is a way for event based stuff with LiveData but I never used it.
 
so with LiveData, what I'm doing is this:
I have a sealed class LoginState
 
Livedata is lifecycle aware
 
with 4 objects in it - WaitingForInput, Loading, Success, Error
and then my fragment observes the LiveData<LoginState>
so that it can hide/show the loading indicator
 
9:55 PM
In practice it shouldn't be a big deal because once you get success, you navigate away.
An example where this can go wrong is if you're using LiveData to expose say text for a snackbar.

If you rotate your phone, but you never clear the livedata, the fragment observes that twice, and it'll reshow the snackbar every time you recreate.
The same kinda bug doesn't come up often if you navigate away, but it's worth being aware of, that's all.
 
well
I'm also in a situation where I can lock to Portrait mode
so there's very little chance of a configuration change issue
 
cool cool
 
but I'd like to have good habits/practices
 
Yeah definitely.
 
so theoretically if they rotate the phone,
 
9:56 PM
It's hard to know sometimes. I need to do some more testing of that stuff in my own app even though we also lock portrait.
I've also been meaning to comb through for memory leaks
 
the new Fragment goes to observe the LiveData
 
If the client is not paying enough, I also just lock it in portrait mode
 
maybe I was in... what? Loading?
what causes a problem?
 
01:00 - 22:0022:00 - 00:00

« first day (3782 days earlier)      last day (1165 days later) »