Эх сурвалжийг харах

Use "user" icon as fallback icon for profile menu

Signed-off-by: Henrik Storch <henrik.storch@nextcloud.com>
Henrik Storch 3 жил өмнө
parent
commit
99a9c10f3a

+ 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) {