powersync-ja / powersync-js

SDK that enables local-first and real-time reactive apps with embedded SQLite for JavaScript clients, including React Native and Web
https://www.powersync.com
Apache License 2.0
282 stars 20 forks source link

hasSynced status not being reset on disconnectAndClear #310

Closed shelley-xyris closed 2 weeks ago

shelley-xyris commented 3 weeks ago

Hello,

I believe this issue has been previously fixed for the Flutter client but not for React. I need to reference the hasSynced or lastSyncedAt status when a user first logs into the app and this works as expected until the user logs out and then into a different account. The hasSynced is still set to true even after calling disconnectAndClear.

Chriztiaan commented 3 weeks ago

Hey @shelley-xyris, I have just retested this in both the react-supabase-todolist and react-native-supabase-todolist demos and it seems to be working. We implemented a similar fix to the flutter client in this PR around mid-august. Is it possible that you are using an older library version?

If the problem persists, we might need to figure out how your implementation differs from the demo and would this be in React or React-native?

kobiebotha commented 2 weeks ago

@shelley-xyris any feedback for us on this perhaps? Otherwise we'll mark as resolved in a few days.

shelley-xyris commented 2 weeks ago

It does appear to be resolved, thank you