From f78becf791de7258c5d5dae52a0d5eccedd64a6f Mon Sep 17 00:00:00 2001 From: Selim Mustafaev Date: Sun, 11 Aug 2024 14:37:28 +0300 Subject: [PATCH] Fix for displaying photos --- AutoCat.xcodeproj/project.pbxproj | 4 ++-- AutoCat/Screens/AdsScreen/AdsScreen.swift | 2 +- AutoCatCore/Models/DTO/VehicleAdDto.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AutoCat.xcodeproj/project.pbxproj b/AutoCat.xcodeproj/project.pbxproj index 80830ea..fbc6c40 100644 --- a/AutoCat.xcodeproj/project.pbxproj +++ b/AutoCat.xcodeproj/project.pbxproj @@ -1567,7 +1567,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 133; + CURRENT_PROJECT_VERSION = 134; DEVELOPMENT_TEAM = 46DTTB8X4S; INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = AutoCat; @@ -1594,7 +1594,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 133; + CURRENT_PROJECT_VERSION = 134; DEVELOPMENT_TEAM = 46DTTB8X4S; INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = AutoCat; diff --git a/AutoCat/Screens/AdsScreen/AdsScreen.swift b/AutoCat/Screens/AdsScreen/AdsScreen.swift index 3369046..df5c08a 100644 --- a/AutoCat/Screens/AdsScreen/AdsScreen.swift +++ b/AutoCat/Screens/AdsScreen/AdsScreen.swift @@ -15,7 +15,7 @@ struct AdsScreen: View { @State var galleryModel: ACImageSliderModel? var body: some View { - List(viewModel.ads) { ad in + List(viewModel.ads, id: \.self) { ad in Section(viewModel.dateStringFrom(ad.date)) { if let price = ad.price { TextRowView(title: "Price", value: price) diff --git a/AutoCatCore/Models/DTO/VehicleAdDto.swift b/AutoCatCore/Models/DTO/VehicleAdDto.swift index 9b55136..62415da 100644 --- a/AutoCatCore/Models/DTO/VehicleAdDto.swift +++ b/AutoCatCore/Models/DTO/VehicleAdDto.swift @@ -8,7 +8,7 @@ import Foundation -public struct VehicleAdDto: Decodable, Sendable, Identifiable { +public struct VehicleAdDto: Decodable, Sendable, Hashable { public var id: Int = 0 public var url: String?