瀏覽代碼

Use "user" icon as fallback icon for profile menu

Signed-off-by: Henrik Storch <henrik.storch@nextcloud.com>
Henrik Storch 3 年之前
父節點
當前提交
99a9c10f3a
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      iOSClient/Menu/UIViewController+Menu.swift

+ 2 - 1
iOSClient/Menu/UIViewController+Menu.swift

@@ -24,6 +24,7 @@
 import Foundation
 import SVGKit
 import NCCommunication
+import UIKit
 
 extension UIViewController {
     fileprivate func handleProfileAction(_ action: NCHovercard.Action, for userId: String) {
@@ -71,7 +72,7 @@ extension UIViewController {
                 action: nil)
 
             let actions = card.actions.map { action -> NCMenuAction in
-                var image = UIImage()
+                var image = UIImage(named: "user") ?? UIImage()
                 if let url = URL(string: action.icon),
                    let svgSource = SVGKSourceURL.source(from: url),
                    let svg = SVGKImage(source: svgSource) {