peterfriese / MakeItSo

This is the source code for Make It So, the sample app accompanying my blog post "Replicating the iOS Reminders App Using SwiftUI and Firebase"

Home Page:https://twitter.com/peterfriese/status/1453467058302291975

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

User data not reloading after auth state changes

peterfriese opened this issue · comments

When a user signs in (or out), the task data in the main task list doesn't refresh.

This is a regression introduced in a local branch. Instead of re-creating the snapshot listener, we continue using the old one (with the previous auth state).

The previously used code did a better job:

if listenerRegistration != nil {
  listenerRegistration?.remove()
}
listenerRegistration = db.collection(tasksPath)
// ...