Saved subscriptions: auto-refresh + change notifications#2
Merged
Conversation
Adds a Subscriptions tab so users can save multiple happ:// links (or plain http(s) sub URLs), refresh them, and get notified when configs change (e.g. when servers get blocked). - SavedSubscription model + SubscriptionStore (JSON on disk). - ChangeDetector: pure diff of config-URI snapshots (added/removed). - RefreshService: re-runs extraction per subscription, detects changes, fires notifications; one failure does not abort the batch. - NotificationService: local UNUserNotificationCenter alerts on change. - RefreshCoordinator: foreground + pull-to-refresh, applied on the main actor. - BackgroundRefresh: BGAppRefreshTask (com.happwn.refresh), opportunistic. - ExtractionService now accepts a plain http(s) subscription URL (skips decryption). - UI: Subscriptions list, detail (edit name, per-sub notify, refresh, delete), add sheet; Save button on Extract; Settings 'Обновления' section (notifications, background refresh, min interval). Notifications + background refresh default ON. - Info.plist with UIBackgroundModes + BGTaskSchedulerPermittedIdentifiers; project.yml wired to it. Bump to 1.0.2 (build 3). - Tests: ChangeDetector, SubscriptionStore, RefreshService, plain-URL extraction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds saving multiple subscriptions with periodic refresh and local notifications when configs change (e.g. when servers get blocked).
Features
+X / −Y). Notifications + background refresh are on by default.BGAppRefreshTask(opportunistic; iOS controls exact timing). Min-interval setting (1/3/6/12 h).ExtractionServicenow accepts an http(s) subscription URL directly (skips decryption), extracts vless/etc. and reports changes.Architecture
SavedSubscription+SubscriptionStore(JSON on disk)ChangeDetector(pure diff),RefreshService(per-sub, fault-isolated),NotificationService,RefreshCoordinator,BackgroundRefreshInfo.plistwithUIBackgroundModes+BGTaskSchedulerPermittedIdentifiers; bump to 1.0.2 (build 3)Tests
ChangeDetector, SubscriptionStore round-trip, RefreshService (change/no-change/disabled/fault-isolation), plain-URL extraction.
Authored on Windows — not compiled locally; relying on CI build + simulator tests.