Distinct

Distinct

Syntax

sessionState
	.rx
	.user
	.distinctUntilChanged(at: \.?.uniqueId)
	.unwrap()

vs

sessionState
	.rx
	.user
	.unwrap()
	.distinctUntilChanged(at: \.?.uniqueId)

Before After

non nil object = unique_id

Initial app launch

User 1: nil

User 1 logs in: old(nil) vs (unique_id)

User Deactivated: old(unique_id) vs new(nil) - session Coordinator purgeEntries

User activated & app isn't closed
old(nil) vs new(unique_id)

Mind Map

Combine equivalent filter