jasje we should have completed the migration. It got really confusing for me when I was working on some stuff because half the app uses one and the half another and their is code duplication.
We shouldn’t de-prioritise such things.
jasje joined the channel
jasje
akshaaatt: alright will do it
jasje has quit
akshaaatt
I’ve made the changes now jasje
But the point is that we shouldn’t abandon such things and move on to solving other things
jasje joined the channel
jasje
understood
jasje has quit
the4oo4 has quit
bou[m] has quit
ROpdebee has quit
ROpdebee joined the channel
pranay joined the channel
pranay has quit
trolley has quit
trolley joined the channel
Maxr1998 has quit
Maxr1998 joined the channel
pranay joined the channel
pranay has quit
pranay joined the channel
pranay has quit
[Pokey] joined the channel
trolley has quit
theraspberry has quit
saumon has quit
s1b1 has quit
Freso has quit
rcombs has quit
bigquestion has quit
loujine has quit
atj has quit
atj joined the channel
bigquestion joined the channel
saumon joined the channel
Freso joined the channel
Freso has quit
Freso joined the channel
trolley joined the channel
rcombs joined the channel
loujine joined the channel
s1b1 joined the channel
[Pokey] has quit
[Pokey] joined the channel
[Pokey] has quit
Maxr1998_ joined the channel
Maxr1998 has quit
BrainzGit
[listenbrainz-android] 14akshaaatt opened pull request #143 (03main…migration): Complete Migration from UserPreferences to AppPreferences, Fix Listens Service and cleanup code https://github.com/metabrainz/listenbrainz-andr...
CatQuest
Pratha-Fish: yes!
jasje joined the channel
jasje
hi akshaaatt
akshaaatt
Hi jasje!
jasje
So what I meant originally was: onActiveSessionsChangedListener gets called a lot
like a lot
so if the user is logged in
akshaaatt
It’s called whenever a new app opens up
jasje
that makes username != null true
akshaaatt: its buggy
akshaaatt
Right. That could help us lol
Nice hack
jasje
so whenever i switch to another app or the callback itself bugs
the API would be called
akshaaatt
I think this is a bad sign for us. We should move the services api to some place else then
jasje
yes
Call it in app start
save its result
call it when user logs in
but not the service
ive debugged it for hours and learned how shit code android devs wrote
akshaaatt
😂😂😂😂
jasje
all callbacks are called like 2-3 times ffs
sometime out of nowhere
the username variable is fine btw
the process of registering is pretty instantaneous
so no worries there
akshaaatt
I have to see now. This is shitty. What if the controllers register spotify first and then the services api fetches the results
When do we remove it?
jasje
when the service bugs out or activeSessionsChange
bugging out is rare but there
Pratha-Fish
CatQuest: epic! As an EDM guy that place is a pilgrimage site for me 😭
jasje
swiping away notification causes an app to lose its current mediaSession
so its like if we really try to make it sync, we lose performance
but if we let nature do its thing
akshaaatt
Right
jasje
it'd be nice
akshaaatt
XD
jasje
I was thinking of using broadcast recievers
But don't know much about it
akshaaatt
Yeah. That could be another option
My mind is already too fucked today. This PR was hell for me
jasje
great
take rest soldier
xD
or shall i say]
cap'n
akshaaatt: btw i would like to do the broadcast part
so dont worry there
akshaaatt
jasje: I don’t think calling the services api even on app start is a good idea
The user could unlink their spotify account so we have to call it somewhere for frequent updates
jasje
akshaaatt: its really a problem where the server needs to send the update and not what the frontend demands
I mean… our app is great but there are some things which are like… wtf do I do here. “Just ask the user to add their 100 lines token in the app and make them do a pseudo login just to get the username”
We haven’t yet handled the case where the user might update their username. What would we do then😂
jasje
bottlenecked by server
username can't be updated in lb
afaik
akshaaatt
It was under work somewhere
Tbh we have the same username everywhere
There is an update functionality somehwere
Might be MB, I think
jasje
that would again be an FCM problem
akshaaatt
No jasje
jasje
why
akshaaatt
We need a getUser api which gives us everything when the app opens
That will solve everything
All user details at once for that session
We just take care of the token.. everything else will be provided in runtime and not persisted
jasje chants fcm again but slowly
XD
jasje
these cases are just the cases where "server needs to send update"
or server wants to communicate
not the device
akshaaatt
Well. We have REST apis. For your use case jasje, we might have to look knto socket io connection
Fcm won’t be good for handling small updates
It’s usually used for promotion and user notifications