|
@@ -27,6 +27,7 @@ import UIKit
|
|
import FloatingPanel
|
|
import FloatingPanel
|
|
import NCCommunication
|
|
import NCCommunication
|
|
import Queuer
|
|
import Queuer
|
|
|
|
+import SVGKit
|
|
|
|
|
|
extension UIViewController {
|
|
extension UIViewController {
|
|
func handleProfileAction(_ action: NCHovercard.Action, for userId: String) {
|
|
func handleProfileAction(_ action: NCHovercard.Action, for userId: String) {
|
|
@@ -64,8 +65,8 @@ extension UIViewController {
|
|
|
|
|
|
let actions = card.actions.map { action -> NCMenuAction in
|
|
let actions = card.actions.map { action -> NCMenuAction in
|
|
var image = UIImage()
|
|
var image = UIImage()
|
|
- if let url = URL(string: action.icon), let loadedImage = try? UIImage(data: Data(contentsOf: url)) {
|
|
|
|
- image = loadedImage
|
|
|
|
|
|
+ if let url = URL(string: action.icon), let svg = SVGKImage(contentsOf: url) {
|
|
|
|
+ image = svg.uiImage
|
|
}
|
|
}
|
|
return NCMenuAction(
|
|
return NCMenuAction(
|
|
title: action.title,
|
|
title: action.title,
|