Private
Public Access
1
0

Some minor changes

This commit is contained in:
2025-08-29 18:49:00 -06:00
parent 5da92a90d4
commit 54df338ce0
3 changed files with 16 additions and 5 deletions

View File

@@ -17,9 +17,15 @@ struct ConversationListView: View
let isUnread = conv.wrappedValue.unreadCount > 0 let isUnread = conv.wrappedValue.unreadCount > 0
HStack(spacing: 0.0) { HStack(spacing: 0.0) {
Image(systemName: isUnread ? "circlebadge.fill" : "") if isUnread {
.foregroundStyle(.tint) Image(systemName: "circlebadge.fill")
.frame(width: 10.0) .foregroundStyle(.tint)
.frame(width: 10.0)
} else {
Rectangle()
.foregroundStyle(.clear)
.frame(width: 10.0)
}
VStack(alignment: .leading) { VStack(alignment: .leading) {
Text(conv.wrappedValue.displayName) Text(conv.wrappedValue.displayName)

View File

@@ -128,6 +128,8 @@ struct ImageItemView: View
let ns = NSImage(data: data) { let ns = NSImage(data: data) {
img = ns img = ns
} }
try handle.close()
} catch { } catch {
print("Attachment file handle acquisition error: \(error)") print("Attachment file handle acquisition error: \(error)")
} }

View File

@@ -148,9 +148,11 @@ final class XPCClient
guard let reply = try await sendSync(req), xpc_get_type(reply) == XPC_TYPE_DICTIONARY else { throw Error.typeError } guard let reply = try await sendSync(req), xpc_get_type(reply) == XPC_TYPE_DICTIONARY else { throw Error.typeError }
let fd = xpc_dictionary_dup_fd(reply, "fd") let fd = xpc_dictionary_dup_fd(reply, "fd")
if fd < 0 { throw Error.typeError } let fileHandler = FileHandle(fileDescriptor: fd, closeOnDealloc: true)
return FileHandle(fileDescriptor: fd, closeOnDealloc: true) if fd < 0 { throw Error.badFileHandle }
return fileHandler
} }
public func getSettings() async throws -> Serialized.Settings { public func getSettings() async throws -> Serialized.Settings {
@@ -177,6 +179,7 @@ final class XPCClient
{ {
case typeError case typeError
case encodingError case encodingError
case badFileHandle
} }
enum Signal enum Signal