Files
MagnumOpus/Packages/MagnumOpusCore/Sources/Models/MailboxInfo.swift
T
felixfoertsch f37b287f5e add models module: shared types for accounts, messages, threads, sync
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>
2026-03-13 18:11:24 +01:00

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"
}
}
}