patientsknowbest/unit

RestartTracker subscription should not filter for target and filters should be extended

Closed this issue · 1 comments

        RestartTracker(Bus bus, String id) {
            this.id = id;
            hasStopped = false;
            hasStarted = false;
            disposable = payloads(bus.events(), Transition.class, id)
                    .subscribe(this::onTransition);
        }

This is wrong. The id param should be removed because we don't need to filter for message's target.

However, we do need to filter for messages that are about the observed unit. To achieve that we need to add another generic Filter method.

Fixed in #28