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.
2023-04-30 12039, 2023
akshaaatt
We shouldn’t de-prioritise such things.
2023-04-30 12044, 2023
jasje joined the channel
2023-04-30 12047, 2023
jasje
akshaaatt: alright will do it
2023-04-30 12051, 2023
jasje has quit
2023-04-30 12008, 2023
akshaaatt
I’ve made the changes now jasje
2023-04-30 12034, 2023
akshaaatt
But the point is that we shouldn’t abandon such things and move on to solving other things
2023-04-30 12007, 2023
jasje joined the channel
2023-04-30 12058, 2023
jasje
understood
2023-04-30 12025, 2023
jasje has quit
2023-04-30 12008, 2023
the4oo4 has quit
2023-04-30 12008, 2023
bou[m] has quit
2023-04-30 12014, 2023
ROpdebee has quit
2023-04-30 12050, 2023
ROpdebee joined the channel
2023-04-30 12042, 2023
pranay joined the channel
2023-04-30 12028, 2023
pranay has quit
2023-04-30 12022, 2023
trolley has quit
2023-04-30 12009, 2023
trolley joined the channel
2023-04-30 12013, 2023
Maxr1998 has quit
2023-04-30 12027, 2023
Maxr1998 joined the channel
2023-04-30 12022, 2023
pranay joined the channel
2023-04-30 12008, 2023
pranay has quit
2023-04-30 12011, 2023
pranay joined the channel
2023-04-30 12043, 2023
pranay has quit
2023-04-30 12024, 2023
[Pokey] joined the channel
2023-04-30 12020, 2023
trolley has quit
2023-04-30 12021, 2023
theraspberry has quit
2023-04-30 12021, 2023
saumon has quit
2023-04-30 12021, 2023
s1b1 has quit
2023-04-30 12021, 2023
Freso has quit
2023-04-30 12021, 2023
rcombs has quit
2023-04-30 12021, 2023
bigquestion has quit
2023-04-30 12021, 2023
loujine has quit
2023-04-30 12022, 2023
atj has quit
2023-04-30 12038, 2023
atj joined the channel
2023-04-30 12040, 2023
bigquestion joined the channel
2023-04-30 12053, 2023
saumon joined the channel
2023-04-30 12019, 2023
Freso joined the channel
2023-04-30 12004, 2023
Freso has quit
2023-04-30 12004, 2023
Freso joined the channel
2023-04-30 12050, 2023
trolley joined the channel
2023-04-30 12050, 2023
rcombs joined the channel
2023-04-30 12035, 2023
loujine joined the channel
2023-04-30 12013, 2023
s1b1 joined the channel
2023-04-30 12055, 2023
[Pokey] has quit
2023-04-30 12055, 2023
[Pokey] joined the channel
2023-04-30 12022, 2023
[Pokey] has quit
2023-04-30 12004, 2023
Maxr1998_ joined the channel
2023-04-30 12005, 2023
Maxr1998 has quit
2023-04-30 12008, 2023
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-androi…
2023-04-30 12015, 2023
CatQuest
Pratha-Fish: yes!
2023-04-30 12044, 2023
jasje joined the channel
2023-04-30 12014, 2023
jasje
hi akshaaatt
2023-04-30 12055, 2023
akshaaatt
Hi jasje!
2023-04-30 12017, 2023
jasje
So what I meant originally was: onActiveSessionsChangedListener gets called a lot
2023-04-30 12019, 2023
jasje
like a lot
2023-04-30 12028, 2023
jasje
so if the user is logged in
2023-04-30 12057, 2023
akshaaatt
It’s called whenever a new app opens up
2023-04-30 12058, 2023
jasje
that makes username != null true
2023-04-30 12009, 2023
jasje
akshaaatt: its buggy
2023-04-30 12011, 2023
akshaaatt
Right. That could help us lol
2023-04-30 12015, 2023
akshaaatt
Nice hack
2023-04-30 12047, 2023
jasje
so whenever i switch to another app or the callback itself bugs
2023-04-30 12003, 2023
jasje
the API would be called
2023-04-30 12039, 2023
akshaaatt
I think this is a bad sign for us. We should move the services api to some place else then
2023-04-30 12047, 2023
jasje
yes
2023-04-30 12059, 2023
jasje
Call it in app start
2023-04-30 12003, 2023
jasje
save its result
2023-04-30 12017, 2023
jasje
call it when user logs in
2023-04-30 12048, 2023
jasje
but not the service
2023-04-30 12007, 2023
jasje
ive debugged it for hours and learned how shit code android devs wrote
2023-04-30 12018, 2023
akshaaatt
😂😂😂😂
2023-04-30 12026, 2023
jasje
all callbacks are called like 2-3 times ffs
2023-04-30 12038, 2023
jasje
sometime out of nowhere
2023-04-30 12009, 2023
jasje
the username variable is fine btw
2023-04-30 12036, 2023
jasje
the process of registering is pretty instantaneous
2023-04-30 12044, 2023
jasje
so no worries there
2023-04-30 12009, 2023
akshaaatt
I have to see now. This is shitty. What if the controllers register spotify first and then the services api fetches the results
2023-04-30 12016, 2023
akshaaatt
When do we remove it?
2023-04-30 12030, 2023
jasje
when the service bugs out or activeSessionsChange
2023-04-30 12042, 2023
jasje
bugging out is rare but there
2023-04-30 12054, 2023
Pratha-Fish
CatQuest: epic! As an EDM guy that place is a pilgrimage site for me 😭
2023-04-30 12038, 2023
jasje
swiping away notification causes an app to lose its current mediaSession
2023-04-30 12009, 2023
jasje
so its like if we really try to make it sync, we lose performance
2023-04-30 12023, 2023
jasje
but if we let nature do its thing
2023-04-30 12028, 2023
akshaaatt
Right
2023-04-30 12030, 2023
jasje
it'd be nice
2023-04-30 12042, 2023
akshaaatt
XD
2023-04-30 12038, 2023
jasje
I was thinking of using broadcast recievers
2023-04-30 12056, 2023
jasje
But don't know much about it
2023-04-30 12016, 2023
akshaaatt
Yeah. That could be another option
2023-04-30 12029, 2023
akshaaatt
My mind is already too fucked today. This PR was hell for me
2023-04-30 12034, 2023
jasje
great
2023-04-30 12004, 2023
jasje
take rest soldier
2023-04-30 12016, 2023
jasje
xD
2023-04-30 12022, 2023
jasje
or shall i say]
2023-04-30 12028, 2023
jasje
cap'n
2023-04-30 12033, 2023
jasje
akshaaatt: btw i would like to do the broadcast part
2023-04-30 12055, 2023
jasje
so dont worry there
2023-04-30 12011, 2023
akshaaatt
jasje: I don’t think calling the services api even on app start is a good idea
2023-04-30 12016, 2023
akshaaatt
The user could unlink their spotify account so we have to call it somewhere for frequent updates
2023-04-30 12022, 2023
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”
2023-04-30 12045, 2023
akshaaatt
We haven’t yet handled the case where the user might update their username. What would we do then😂
2023-04-30 12053, 2023
jasje
bottlenecked by server
2023-04-30 12004, 2023
jasje
username can't be updated in lb
2023-04-30 12011, 2023
jasje
afaik
2023-04-30 12018, 2023
akshaaatt
It was under work somewhere
2023-04-30 12029, 2023
akshaaatt
Tbh we have the same username everywhere
2023-04-30 12036, 2023
akshaaatt
There is an update functionality somehwere
2023-04-30 12047, 2023
akshaaatt
Might be MB, I think
2023-04-30 12055, 2023
jasje
that would again be an FCM problem
2023-04-30 12004, 2023
akshaaatt
No jasje
2023-04-30 12013, 2023
jasje
why
2023-04-30 12018, 2023
akshaaatt
We need a getUser api which gives us everything when the app opens
2023-04-30 12023, 2023
akshaaatt
That will solve everything
2023-04-30 12041, 2023
akshaaatt
All user details at once for that session
2023-04-30 12043, 2023
akshaaatt
We just take care of the token.. everything else will be provided in runtime and not persisted
2023-04-30 12052, 2023
jasje chants fcm again but slowly
2023-04-30 12025, 2023
akshaaatt
XD
2023-04-30 12031, 2023
jasje
these cases are just the cases where "server needs to send update"
2023-04-30 12053, 2023
jasje
or server wants to communicate
2023-04-30 12057, 2023
jasje
not the device
2023-04-30 12003, 2023
akshaaatt
Well. We have REST apis. For your use case jasje, we might have to look knto socket io connection
2023-04-30 12018, 2023
akshaaatt
Fcm won’t be good for handling small updates
2023-04-30 12041, 2023
akshaaatt
It’s usually used for promotion and user notifications