Remove in-list spinner + add monitored-repos setting; bump to 2.3
Build iOS App / Build .ipa and publish source (push) Successful in 22s
Build iOS App / Build .ipa and publish source (push) Successful in 22s
- Remove the in-list loading wheel overlay; the landing page just shows the cached list or the 'No open PRs' screen. - Add a 'Monitored repos' setting (Settings > Inbox) that limits the inbox to specific repos, cutting the number of API calls dramatically. Empty = monitor all accessible repos. Bump to 2.3.
This commit is contained in:
1 parent
75f5f3bc64
commit
880cff9e68
6 files changed
+120
-17
No files matched your search
@@ -47,14 +47,21 @@ final class InboxViewModel: ObservableObject {
|
||||
|
||||
do {
|
||||
let repos = try await client.repos()
|
||||
LogStore.shared.log(.info, "Inbox: \(repos.count) repos")
|
||||
// Fetch open PRs across all repos concurrently. A single repo that
|
||||
// fails (e.g. 404) must NOT wipe the whole inbox — catch per-repo
|
||||
// errors, log them, and keep whatever succeeded.
|
||||
// If the user has configured monitored repos, only fetch PRs for
|
||||
// those — this cuts the number of API calls dramatically (the
|
||||
// inbox was fetching every accessible repo).
|
||||
let monitored = SettingsStore.shared.monitoredRepos
|
||||
let targets = monitored.isEmpty
|
||||
? repos
|
||||
: repos.filter { monitored.contains($0.fullName) }
|
||||
LogStore.shared.log(.info, "Inbox: \(targets.count)/\(repos.count) repos")
|
||||
// Fetch open PRs across the target repos concurrently. A single
|
||||
// repo that fails (e.g. 404) must NOT wipe the whole inbox — catch
|
||||
// per-repo errors, log them, and keep whatever succeeded.
|
||||
var rows: [PRRow] = []
|
||||
var failures: [String] = []
|
||||
await withTaskGroup(of: Result<[PRRow], Error>.self) { group in
|
||||
for repo in repos {
|
||||
for repo in targets {
|
||||
group.addTask {
|
||||
do {
|
||||
let prs = try await client.pullRequests(owner: repo.owner.login,
|
||||
|
||||
Reference in new issue
Block a user