set state on notification