Explorar o código

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

show download failure
cyBerta %!s(int64=3) %!d(string=hai) anos
pai
achega
735b2cb96e
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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
         isActionButtonHidden = !hasWebxdc && !hasHtml && downloadState == DC_DOWNLOAD_DONE
         
         
         switch downloadState {
         switch downloadState {
-        case DC_DOWNLOAD_FAILURE, DC_DOWNLOAD_AVAILABLE:
+        case DC_DOWNLOAD_AVAILABLE:
             actionButton.setTitle(String.localized("download"), for: .normal)
             actionButton.setTitle(String.localized("download"), for: .normal)
+        case DC_DOWNLOAD_FAILURE:
+            actionButton.setTitle(String.localized("download_failed"), for: .normal)
         case DC_DOWNLOAD_IN_PROGRESS:
         case DC_DOWNLOAD_IN_PROGRESS:
             actionButton.isEnabled = false
             actionButton.isEnabled = false
             actionButton.setTitle(String.localized("downloading"), for: .normal)
             actionButton.setTitle(String.localized("downloading"), for: .normal)