File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
Example/SDWebImageSwiftUIDemo Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,6 @@ import SwiftUI
10
10
import SDWebImage
11
11
import SDWebImageSwiftUI
12
12
13
- // Allows `String` in `ForEach`
14
- extension String : Identifiable {
15
- public typealias ID = Int
16
- public var id : Int {
17
- self . hashValue
18
- }
19
- }
20
-
21
13
#if os(watchOS)
22
14
// watchOS does not provide built-in indicator, use Espera's custom indicator
23
15
extension Indicator where T == LoadingFlowerView {
@@ -107,7 +99,7 @@ struct ContentView: View {
107
99
108
100
func contentView( ) -> some View {
109
101
List {
110
- ForEach ( imageURLs) { url in
102
+ ForEach ( imageURLs, id : \ . self ) { url in
111
103
NavigationLink ( destination: DetailView ( url: url, animated: self . animated) ) {
112
104
HStack {
113
105
if self . animated {
You can’t perform that action at this time.
0 commit comments