dexie / Dexie.js

A Minimalistic Wrapper for IndexedDB
https://dexie.org
Apache License 2.0
11.46k stars 642 forks source link

DexieCloud -> ToDo Sample leave #1761

Open b-straub opened 1 year ago

b-straub commented 1 year ago

When the last member leaves a shared list, the list should be transferred back to the public realm similar to the case when a list owner removes all shares. Since the (Member)Livequery can not alter the database I wonder how to handle this case properly.

The current ToDo sample let the realm persist, even when all other members have left.

dfahlander commented 1 year ago

It is only possible to make the list private again (not sharable) by someone with full permissions in the realm. When the owner of the list deletes all members but themself, I interpret it as an expression of will to stop sharing the list, but I was hesitating whether the action to delete the last member and the action to unshare the list would be two distinct action (maybe more correct) or whether the action to delete the last member was expression of will to also unshare the list. I went for the latter for usability. However, having a sharable list with only oneself as it's sole member is de facto the same as having a private list (from the user's perspective) so I don't see the reason to unshare the list when a non-owner leaves it.