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