Skip to content

Commit

Permalink
fix: Remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
lebojo committed Nov 25, 2024
1 parent 81676ba commit 3b6959a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@

import InfomaniakCoreSwiftUI
import InfomaniakDI
import MailCore
import MailCoreUI
import MailResources
import RealmSwift
import SwiftUI

struct ScheduleFloatingPanelView: View {
@LazyInjectService private var draftManager: DraftManager

@Binding var customSchedule: Bool
@Binding var isShowingDiscovery: Bool

Expand Down
4 changes: 3 additions & 1 deletion MailCore/Cache/MailboxManager/MailboxManager+Draft.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ public extension MailboxManager {
}

func deleteLocally(drafts: [Draft]) async throws {
let localUuids = drafts.map(\.localUUID)
try? writeTransaction { writableRealm in
let liveDrafts = writableRealm.objects(Draft.self)
let liveDrafts = writableRealm.objects(Draft.self).filter("localUUID IN %@", localUuids)

writableRealm.delete(liveDrafts)
}
}
Expand Down

0 comments on commit 3b6959a

Please sign in to comment.