I am using realm-sync inside my application. The application is cross-platform and targeting IOS and UWP devices. According to the business logic, the same user can log in to two devices simultaneously, sharing the current database. Also, the application uses dot-net reactive extensions to behave reactively when the app objects are created/updated/deleted.
The app has a collection screen (Suppose a list of cars), and there is an item details screen (car details).
Imagine that I have logged in on two devices and have navigated to the item details screen on both devices (let’s say car_1 details). Now I am removing car_1 on the first device. The expected behavior is that I should be navigated back to the cars list screen on the second device (The car_1 has been already deleted).
IQueryable<Car> cars as
INotifyCollectionChanged object inside the item details view model. And I am listening the cars collection chages using
ObservableForCollectionChanged() .Subscribe(_ => await NavigateBackAsync());
The problem is that when I delete an item on the first device the collection change event does not emit on the second device.
So the question is, how should I listen to the collection change on second device when it happens on the first one?