Handle collection changed event

This commit is contained in:
smoogipoo 2021-05-20 19:37:43 +09:00
parent 7ee81669f7
commit ee4bca9ed1
1 changed files with 8 additions and 0 deletions

View File

@ -127,6 +127,14 @@ private void onPlayingUserStatesChanged(object sender, NotifyDictionaryChangedEv
foreach (var (userId, _) in e.OldItems.AsNonNull())
onUserStateRemoved(userId);
break;
case NotifyDictionaryChangedAction.Replace:
foreach (var (userId, _) in e.OldItems.AsNonNull())
onUserStateRemoved(userId);
foreach (var (userId, state) in e.NewItems.AsNonNull())
onUserStateAdded(userId, state);
break;
}
}