fix: standardize task polling interval from 2s to 5s (Android parity)

TaskListScreen, MyTasksScreen, and BusinessSelectionScreen all had 2-second
refresh timers. Changed to 5 seconds to match Android and reduce server load.
Chat polling (3s) left unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Schwifty 2026-03-24 22:10:07 +00:00
parent 88a3a9d6e0
commit db7fe31b8a
3 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@ struct BusinessSelectionScreen: View {
@State private var selectedBusiness: Employment?
@State private var debugText = ""
private let refreshTimer = Timer.publish(every: 2, on: .main, in: .common).autoconnect()
private let refreshTimer = Timer.publish(every: 5, on: .main, in: .common).autoconnect()
var body: some View {
NavigationStack {

View file

@ -20,7 +20,7 @@ struct MyTasksScreen: View {
FilterTab(value: "completed", label: "Done", icon: "checkmark.circle.fill"),
]
private let refreshTimer = Timer.publish(every: 2, on: .main, in: .common).autoconnect()
private let refreshTimer = Timer.publish(every: 5, on: .main, in: .common).autoconnect()
var body: some View {
VStack(spacing: 0) {

View file

@ -11,7 +11,7 @@ struct TaskListScreen: View {
@State private var selectedTask: WorkTask?
@State private var showingMyTasks = false
private let refreshTimer = Timer.publish(every: 2, on: .main, in: .common).autoconnect()
private let refreshTimer = Timer.publish(every: 5, on: .main, in: .common).autoconnect()
var body: some View {
ZStack(alignment: .bottomTrailing) {