Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CalenTask/Features/People/ContactsImportView.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import SwiftUI
import SwiftData
import os

/// "Importa dai Contatti" (CRM-1, D72): selezione multipla dalla rubrica del
/// device, dedupe automatico per identifier/email, atterraggio nello spazio
Expand Down Expand Up @@ -128,8 +129,13 @@ struct ContactsImportView: View {
phase = .denied
return
}
let fetched = await Task.detached(priority: .userInitiated) {
(try? ContactsImportService.fetchDeviceContacts()) ?? []
let fetched = await Task.detached(priority: .userInitiated) { () -> [ContactsImportService.DeviceContact] in
do {
return try ContactsImportService.fetchDeviceContacts()
} catch {
Log.app.error("Lettura contatti fallita: \(error.localizedDescription, privacy: .public)")
return []
}
}.value
deviceContacts = fetched
phase = .ready
Expand Down
Loading