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
1010import SDWebImage
1111import SDWebImageSwiftUI
1212
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-
2113#if os(watchOS)
2214// watchOS does not provide built-in indicator, use Espera's custom indicator
2315extension Indicator where T == LoadingFlowerView {
@@ -107,7 +99,7 @@ struct ContentView: View {
10799
108100 func contentView( ) -> some View {
109101 List {
110- ForEach ( imageURLs) { url in
102+ ForEach ( imageURLs, id : \ . self ) { url in
111103 NavigationLink ( destination: DetailView ( url: url, animated: self . animated) ) {
112104 HStack {
113105 if self . animated {
You can’t perform that action at this time.
0 commit comments