I want my app to sync data and changes between devices. It's easy - you create a snapshot listener and update your data every time it's changing. My problem is that I have a sophisticated local data changes tracking and when snapshot listener fires after I changed something on the very same device, this sophisticated system fails. I'd like to filter out local changes - that were done on the same device - and not get any updates from snapshot listener unless the changes come from somewhere else.
I'm writing an iOS app using Swift if that matters but I believe the principles should be the same for all platforms