f37b287f5e
fix Package.swift: remove NIOIMAPCore product reference (only NIOIMAP is exported by swift-nio-imap) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
730 B
Swift
28 lines
730 B
Swift
public struct MailboxInfo: Sendable, Identifiable, Equatable {
|
|
public var id: String
|
|
public var accountId: String
|
|
public var name: String
|
|
public var unreadCount: Int
|
|
public var totalCount: Int
|
|
|
|
public init(id: String, accountId: String, name: String, unreadCount: Int, totalCount: Int) {
|
|
self.id = id
|
|
self.accountId = accountId
|
|
self.name = name
|
|
self.unreadCount = unreadCount
|
|
self.totalCount = totalCount
|
|
}
|
|
|
|
public var systemImage: String {
|
|
switch name.lowercased() {
|
|
case "inbox": "tray"
|
|
case "sent", "sent messages": "paperplane"
|
|
case "drafts": "doc"
|
|
case "trash", "deleted messages": "trash"
|
|
case "archive", "all mail": "archivebox"
|
|
case "junk", "spam": "xmark.bin"
|
|
default: "folder"
|
|
}
|
|
}
|
|
}
|