فهرست منبع

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