浏览代码

also do not crash in debug mode if an image cannot be loaded, may be corrupted, whatnot. it is pretty already, if one wants to investigate, it is easier that way

B. Petersen 2 年之前
父节点
当前提交
8e5034f941
共有 2 个文件被更改,包括 1 次插入2 次删除
  1. 0 1
      deltachat-ios/Controller/ContextMenuController.swift
  2. 1 1
      deltachat-ios/Model/GalleryItem.swift

+ 0 - 1
deltachat-ios/Controller/ContextMenuController.swift

@@ -74,7 +74,6 @@ class ContextMenuController: UIViewController {
 
     private func makeImageView(image: UIImage?) -> UIView? {
         guard let image = image else {
-            safe_fatalError("unexpected nil value")
             return nil
         }
 

+ 1 - 1
deltachat-ios/Model/GalleryItem.swift

@@ -70,7 +70,7 @@ class GalleryItem: ContextMenuItem {
         case .webxdc:
             loadWebxdcThumbnail(from: msg)
         default:
-            safe_fatalError("unsupported viewtype - viewtype \(viewtype) not supported.")
+            return
         }
     }