There is a code:
func getData() async -> [Data] {
do {
let token = try ServiceData.getTokenThrows()
let listData = try await ServiceData.fetchDataNew(token: token) // always return list data
return listData
} catch {
return []
}
}
func entities(for identifiers: [DataModel.ID]) async throws -> [DataModel] {
return await getData().filter {
identifiers.contains($0.id)
}
}
func suggestedEntities() async throws -> [DataModel] {
return await getData()
}
func defaultResult() async -> DataModel? {
return await getData().first
}
}
Sometimes during assembly, when changing user data, the data in WidgetConfiguration Intent @Parameter is not received, although they are in the console, and EntityQuery methods do not throw exceptions. Does anyone have any ideas?