wip
This commit is contained in:
parent
ae7a13e92b
commit
c5a631d546
|
@ -275,7 +275,7 @@ final class DatabaseMiddleware {
|
|||
_ = try database._db.write { db in
|
||||
try Message
|
||||
.filter(Column("id") == id)
|
||||
.updateAll(db, Column("attachmentDownloadFailed").set(to: false))
|
||||
.updateAll(db, Column("attachmentDownloadFailed").set(to: true))
|
||||
}
|
||||
promise(.success(.empty))
|
||||
} catch {
|
||||
|
|
|
@ -68,4 +68,4 @@
|
|||
"Attachment.Send.media" = "Send media";
|
||||
"Attachment.Send.location" = "Send location";
|
||||
"Attachment.Send.contact" = "Send contact";
|
||||
|
||||
"Attachment.Downloading.retry" = "Retry";
|
||||
|
|
|
@ -123,11 +123,19 @@ private struct AttachmentView: View {
|
|||
.frame(width: Const.attachmentPreviewSize, height: Const.attachmentPreviewSize)
|
||||
.overlay {
|
||||
ZStack {
|
||||
Image(systemName: "exclamationmark.triangle")
|
||||
.font(.body1)
|
||||
.foregroundColor(.Rainbow.red500)
|
||||
VStack {
|
||||
Text(L10n.Attachment.Downloading.retry)
|
||||
.font(.body3)
|
||||
.foregroundColor(.Rainbow.red500)
|
||||
Image(systemName: "exclamationmark.arrow.triangle.2.circlepath")
|
||||
.font(.body1)
|
||||
.foregroundColor(.Rainbow.red500)
|
||||
}
|
||||
}
|
||||
}
|
||||
.onTapGesture {
|
||||
// TODO: Retry download
|
||||
}
|
||||
}
|
||||
|
||||
private func progressImageName(_ type: MessageAttachmentType) -> String {
|
||||
|
|
Loading…
Reference in a new issue