Browse Source

Use "user" icon as fallback icon for profile menu

Signed-off-by: Henrik Storch <henrik.storch@nextcloud.com>
Henrik Storch 3 năm trước cách đây
mục cha
commit
99a9c10f3a
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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) {