Skip to content

Commit

Permalink
refactor: Use let where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeWeidmann committed Jan 6, 2025
1 parent 4afcdcf commit dac2560
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions MailCore/Cache/MailboxManager/MailboxManager+Thread.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ public extension MailboxManager {

let liveFolder = folder.fresh(transactionable: self)
let previousCursor = liveFolder?.cursor
var newCursor: String
var messagesUids: MessagesUids
let newCursor: String

if previousCursor == nil {
newCursor = try await fetchOldMessagesUids(folder: folder)
Expand All @@ -76,10 +75,9 @@ public extension MailboxManager {
signature: previousCursor!
)

messagesUids = MessagesUids(
let messagesUids = MessagesUids(
addedShortUids: messageDeltaResult.addedShortUids,
deletedUids: messageDeltaResult.deletedShortUids
.map { Constants.longUid(from: $0, folderId: folder.remoteId) },
deletedUids: messageDeltaResult.deletedShortUids.map { Constants.longUid(from: $0, folderId: folder.remoteId) },
updated: messageDeltaResult.updated,
cursor: messageDeltaResult.cursor,
folderUnreadCount: messageDeltaResult.unreadCount
Expand Down

0 comments on commit dac2560

Please sign in to comment.