I still need to work out some state update stuff, ...
# glance
a
I still need to work out some state update stuff, and maybe consider using the state definition system for some aspects, but we already have enough data duplication related tech debt that we're taking on and I'd prefer not to use that
s
The state definition system is getting reconsidered so you can lean into that preference for now.
a
Ah it is?
s
Yes (you're referring to GlanceStateDefinition right)
a
Yep 🙂
The datastore backed GlanceStateDefinition
That being said, is there any way I can ensure updates happen when I perform them? It seems like GlanceStateDefinition under the hood starts the recomposition work every time
s
Are the update methods not updating the widget?
a
Not consistently
Some attempts yes, others no
s
Can you share some code/example?
a
Sure 🙂
Which portion, the update related code?
s
Yeah, I'm trying to get enough details that I can either say "Oh that's wrong" and help you out or go "Oh that's wrong" and get the Glance side fixed
a
Screenshot 2023-06-15 at 11.25.21.png
In React Native, while the app is in the foreground refreshWidget will get called when access points are added to the list
Once it's updated + saved, a flow from a room backed db should be updating the widget
Screenshot 2023-06-15 at 11.27.18.png
Some of this code is still changing/being migrated
s
does provideGlance get called every time you call update?
a
I can check this
s
I'm trying to see if I need to check if the worker is being rate limited or if there's something wrong with the repository/state stuff. From a first glance (ha) it looks right
a
Gotcha, waiting for our test api to get back some data so I can test with (the test cluster is being a lil moody right now)
s
Sure thing! I'll do some research on my end as well. I'm really excited to see Glance+ReactNative halfway working 🙂
a
Yes! It's the next best thing for me, I usually work on Android native stuff for bluetooth and external partner integrations, and I get web dev fatigue with react native, so being able to use compose here is awesome 😎
Trying to push for an entire app rewrite across the org, early testing with that yields amazing benefits 🙂
Okay, rebuilding, had to undo a small change I made to load bitmaps from cache for initial state, was running into memory issues causing a crash
Seems to be fine right now... I'll keep watch of it
Okay, ran into it, but provideGlance was called... it must be something on react native, the joys of brownfield implementations lol
And it updated, just took a little bit
@Summers Pittman is this work manager being rate limited?