override
fun
onStop
()
{
super
.onStop()
cloudFirestoreManager.stopListeningForPostChanges()
}
Build and run your app. You should see the posts now on the home screen:
You can test the real-time updates by deleting the post directly from the console.
You should see how the change is reflected in the app almost instantly.
Do'stlaringiz bilan baham: