From c44e5f19c71331a5f006101668befe56b31984f8 Mon Sep 17 00:00:00 2001 From: Georg Bauer Date: Fri, 31 Jul 2026 12:35:39 +0200 Subject: [PATCH] Fix home pull activity filtering --- TESTING.md | 6 ++++-- crates/app/src/api.rs | 33 ++++++++++++++++++++++++--------- ios/Sources/ListScreens.swift | 8 -------- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/TESTING.md b/TESTING.md index 4bc4396..941a83e 100644 --- a/TESTING.md +++ b/TESTING.md @@ -117,8 +117,10 @@ xcrun simctl launch booted de.rfc1437.gotcha - [ ] Activity rows have the correct icon, repository, summary, and date. - [ ] The compact icon row below the activity graph sits flat on the normal background with no border or pill and defaults to the clock. Select the - issue, pull-request, and milestone icons in turn; each shows only matching - recent activity or the native empty state, then the clock restores all rows. + issue and pull-request icons in turn; each shows only matching recent + activity or the native empty state, then the clock restores all rows. +- [ ] Pull-request activity includes older creation and close events beyond the + first activity-feed page. - [ ] Tap repository, issue, pull-request, and commit activity. Each opens the matching native tab and destination. - [ ] Non-linkable server activity does not navigate or appear tappable. diff --git a/crates/app/src/api.rs b/crates/app/src/api.rs index cbb73d2..c194aa8 100644 --- a/crates/app/src/api.rs +++ b/crates/app/src/api.rs @@ -690,19 +690,34 @@ pub async fn load_home(server: &Server) -> Result { .map_err(|error| error.to_string())? .login .ok_or("The server account has no username.")?; + let activity_configuration = configuration.clone(); + let activity_login = login.clone(); + let activities = async move { + let mut activities = Vec::new(); + for page in 1.. { + let batch = apis::user_api::user_list_activity_feeds( + &activity_configuration, + &activity_login, + Some(true), + None, + Some(page), + Some(100), + ) + .await + .map_err(|error| error.to_string())?; + if batch.is_empty() { + break; + } + activities.extend(batch); + } + Ok::<_, String>(activities) + }; let (activities, heatmap) = tokio::join!( - apis::user_api::user_list_activity_feeds( - &configuration, - &login, - Some(true), - None, - Some(1), - Some(40), - ), + activities, apis::user_api::user_get_heatmap_data(&configuration, &login), ); Ok(HomeData { - activities: activities.map_err(|error| error.to_string())?, + activities: activities?, heatmap: heatmap.map_err(|error| error.to_string())?, }) } diff --git a/ios/Sources/ListScreens.swift b/ios/Sources/ListScreens.swift index ad8d6ee..bfdcef3 100644 --- a/ios/Sources/ListScreens.swift +++ b/ios/Sources/ListScreens.swift @@ -303,7 +303,6 @@ final class HomeViewController: RefreshingTableViewController { case all case issues case pulls - case milestones func includes(_ row: ActivityRow) -> Bool { switch self { @@ -313,12 +312,6 @@ final class HomeViewController: RefreshingTableViewController { return row.icon.contains("issue") case .pulls: return row.icon.contains("pull") - case .milestones: - // ponytail: Gitea has no milestone event type; use related issue text until it does. - return row.icon.contains("milestone") - || row.icon.contains("issue") - && (row.title.localizedCaseInsensitiveContains("milestone") - || row.detail.localizedCaseInsensitiveContains("milestone")) } } } @@ -484,7 +477,6 @@ final class HeatmapView: UIView { ("clock", "clock.fill", "All activity"), ("exclamationmark.circle", "exclamationmark.circle.fill", "Issues"), ("arrow.triangle.pull", "arrow.triangle.pull", "Pull requests"), - ("flag", "flag.fill", "Milestones"), ] for (index, item) in filterItems.enumerated() { let button = UIButton(type: .custom, primaryAction: UIAction { action in