Skip to content

Commit 826154e

Browse files
BaptGrvPhilippeWeidmann
authored andcommitted
fix: Remove useless type definition
1 parent e78950d commit 826154e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Mail/Views/New Message/AutocompletionView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ struct AutocompletionView: View {
111111
}
112112

113113
private nonisolated func sortByRemoteAndName(lhs: MergedContact, rhs: MergedContact) -> Bool {
114-
var lhsWeight: Int = lhs.remoteContactedTimes ?? 0
115-
var rhsWeight: Int = rhs.remoteContactedTimes ?? 0
114+
var lhsWeight = lhs.remoteContactedTimes ?? 0
115+
var rhsWeight = rhs.remoteContactedTimes ?? 0
116116

117117
if rhs.name.isEmpty || rhs.remoteOther {
118118
rhsWeight = -1

MailCore/Models/Contact/Contact.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public struct InfomaniakContact: Codable, Identifiable {
7676
nickname = try values.decodeIfPresent(String.self, forKey: .nickname)
7777
organization = try values.decodeIfPresent(String.self, forKey: .organization)
7878
groupContactId = try values.decodeIfPresent(List<Int>.self, forKey: .groupContactId)
79-
if let rawContactedTimes = try values.decodeIfPresent([String: Int].self, forKey: .contactedTimes) {
79+
if let rawContactedTimes = try? values.decodeIfPresent([String: Int].self, forKey: .contactedTimes) {
8080
contactedTimes = rawContactedTimes.reduce(into: 0) { result, element in
8181
result += element.value
8282
}

0 commit comments

Comments
 (0)