浏览代码

Merge pull request #1539 from deltachat/show-download-failure

show download failure
cyBerta 3 年之前
父节点
当前提交
735b2cb96e
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      deltachat-ios/Chat/Views/Cells/BaseMessageCell.swift

+ 3 - 1
deltachat-ios/Chat/Views/Cells/BaseMessageCell.swift

@@ -358,8 +358,10 @@ public class BaseMessageCell: UITableViewCell {
         isActionButtonHidden = !hasWebxdc && !hasHtml && downloadState == DC_DOWNLOAD_DONE
         
         switch downloadState {
-        case DC_DOWNLOAD_FAILURE, DC_DOWNLOAD_AVAILABLE:
+        case DC_DOWNLOAD_AVAILABLE:
             actionButton.setTitle(String.localized("download"), for: .normal)
+        case DC_DOWNLOAD_FAILURE:
+            actionButton.setTitle(String.localized("download_failed"), for: .normal)
         case DC_DOWNLOAD_IN_PROGRESS:
             actionButton.isEnabled = false
             actionButton.setTitle(String.localized("downloading"), for: .normal)