mirror of
https://github.com/yattee/yattee.git
synced 2026-10-23 13:12:53 +00:00
Subscribing went wherever the selected account happened to be, and the button offering it read the local store first — so under a server account it claimed a channel was subscribed when only the device knew about it. The button now asks the active provider and nothing else, except under a local context, where the local store is that provider and can answer without a hop. The channel menu gains a destination list: local, plus every account whose backend does subscriptions, whose instance is switched on, and which has a credential on this device. A row names its own target, so it deliberately does not care whether the selected context can be written to — that is precisely the case where naming somewhere else is the only way to subscribe at all. The main button is disabled instead, with the reason beside it. tvOS reaches the same list through its own button and a full-screen picker, because a menu cannot be driven with a remote. Membership is asked for only once the rows are on screen: an unwarmed provider answers by fetching that account's entire subscription list, and asking every destination up front is a burst nobody requested. Answers carry the round they were asked under, and "not asked yet" is kept apart from "asked, not subscribed" — a checkmark the user acts on must not be a guess. SubscriptionService grows the destination-parameterized subscribe, unsubscribe and membership calls the menu writes through, with the context-implicit ones left as wrappers over the current context. A membership answer that outlived its login now says nothing rather than "no". Building a provider moves behind SubscriptionProviderFactory, which is what lets a test see which destination a write was routed to without a server behind it. The unsubscribe-only screens are untouched: they act on the account being browsed, which is the account whose list they are showing.