Skip to content

Commit 648e4be

Browse files
committed
fix: 불필요한 == 연산자 구현으로 인해 수정되었을 시 뷰에서 반영이 안되는 현상 해결
1 parent d3517a4 commit 648e4be

6 files changed

Lines changed: 1 addition & 25 deletions

File tree

DevLog/Domain/Entity/WebPage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
struct WebPage {
10+
struct WebPage: Equatable {
1111
let title: String?
1212
let url: URL
1313
let displayURL: URL

DevLog/Presentation/Structure/Profile/ProfileSelectedDayActivity.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ struct ProfileSelectedDayActivity: Identifiable, Hashable {
2121
return showsCreated ? "생성" : "완료"
2222
}
2323

24-
static func == (lhs: Self, rhs: Self) -> Bool {
25-
lhs.todo.id == rhs.todo.id
26-
&& lhs.showsCreated == rhs.showsCreated
27-
&& lhs.showsCompleted == rhs.showsCompleted
28-
}
29-
3024
func hash(into hasher: inout Hasher) {
3125
hasher.combine(todo.id)
3226
hasher.combine(showsCreated)

DevLog/Presentation/Structure/PushNotificationItem.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ struct PushNotificationItem: Identifiable, Hashable {
2626
self.todoCategory = notification.todoCategory
2727
}
2828

29-
static func == (lhs: PushNotificationItem, rhs: PushNotificationItem) -> Bool {
30-
lhs.id == rhs.id
31-
}
32-
3329
func hash(into hasher: inout Hasher) {
3430
hasher.combine(id)
3531
}

DevLog/Presentation/Structure/RecentTodoItem.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ struct RecentTodoItem: Identifiable, Hashable {
2626
self.category = todo.category
2727
}
2828

29-
static func == (lhs: RecentTodoItem, rhs: RecentTodoItem) -> Bool {
30-
lhs.id == rhs.id
31-
}
32-
3329
func hash(into hasher: inout Hasher) {
3430
hasher.combine(id)
3531
}

DevLog/Presentation/Structure/TodayTodoItem.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ struct TodayTodoItem: Identifiable, Hashable {
2828
self.category = todo.category
2929
}
3030

31-
static func == (lhs: TodayTodoItem, rhs: TodayTodoItem) -> Bool {
32-
lhs.id == rhs.id
33-
}
34-
3531
func hash(into hasher: inout Hasher) {
3632
hasher.combine(id)
3733
}

DevLog/Presentation/Structure/WebPageItem.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,8 @@ struct WebPageItem: Identifiable, Hashable {
1919
var url: URL { metadata.url }
2020
var displayURL: String { metadata.displayURL.absoluteString }
2121
var imageURL: URL? { metadata.imageURL }
22-
}
2322

24-
extension WebPageItem {
2523
func hash(into hasher: inout Hasher) {
2624
hasher.combine(metadata.url)
2725
}
28-
29-
static func == (lhs: WebPageItem, rhs: WebPageItem) -> Bool {
30-
lhs.metadata.url == rhs.metadata.url
31-
}
3226
}

0 commit comments

Comments
 (0)