Some minor changes
This commit is contained in:
@@ -17,9 +17,15 @@ struct ConversationListView: View
|
||||
let isUnread = conv.wrappedValue.unreadCount > 0
|
||||
|
||||
HStack(spacing: 0.0) {
|
||||
Image(systemName: isUnread ? "circlebadge.fill" : "")
|
||||
.foregroundStyle(.tint)
|
||||
.frame(width: 10.0)
|
||||
if isUnread {
|
||||
Image(systemName: "circlebadge.fill")
|
||||
.foregroundStyle(.tint)
|
||||
.frame(width: 10.0)
|
||||
} else {
|
||||
Rectangle()
|
||||
.foregroundStyle(.clear)
|
||||
.frame(width: 10.0)
|
||||
}
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
Text(conv.wrappedValue.displayName)
|
||||
|
||||
@@ -128,6 +128,8 @@ struct ImageItemView: View
|
||||
let ns = NSImage(data: data) {
|
||||
img = ns
|
||||
}
|
||||
|
||||
try handle.close()
|
||||
} catch {
|
||||
print("Attachment file handle acquisition error: \(error)")
|
||||
}
|
||||
|
||||
@@ -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 }
|
||||
|
||||
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 {
|
||||
@@ -177,6 +179,7 @@ final class XPCClient
|
||||
{
|
||||
case typeError
|
||||
case encodingError
|
||||
case badFileHandle
|
||||
}
|
||||
|
||||
enum Signal
|
||||
|
||||
Reference in New Issue
Block a user