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:
parent
88a3a9d6e0
commit
db7fe31b8a
3 changed files with 3 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue