|
@@ -157,7 +157,7 @@ func getDashboardDataEntry(intent: Applications?, isPreview: Bool, displaySize:
|
|
|
var iconFileName: String?
|
|
|
|
|
|
if let iconUrl = item.iconUrl, let url = URL(string: iconUrl) {
|
|
|
- var size: CGFloat = 128
|
|
|
+ var size = CGFloat(NCGlobal.shared.sizeIcon)
|
|
|
if let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false) {
|
|
|
|
|
|
let path = (urlComponents.path as NSString)
|
|
@@ -168,15 +168,13 @@ func getDashboardDataEntry(intent: Applications?, isPreview: Bool, displaySize:
|
|
|
iconFileName = item
|
|
|
} else if pathComponents[1] == "avatar" {
|
|
|
iconFileName = pathComponents[2]
|
|
|
- if let int = Int(pathComponents[3]) {
|
|
|
- size = CGFloat(int)
|
|
|
- }
|
|
|
+ size = CGFloat(NCGlobal.shared.avatarSize)
|
|
|
} else {
|
|
|
iconFileName = ((path.lastPathComponent) as NSString).deletingPathExtension
|
|
|
}
|
|
|
}
|
|
|
let semaphore = DispatchSemaphore(value: 0)
|
|
|
- NCUtility.shared.getImageUserData(url: url, fileName: iconFileName , size: size) { image in
|
|
|
+ NCUtility.shared.getImageUserData(url: url, fileName: iconFileName, size: size) { image in
|
|
|
if let image = image {
|
|
|
icon = image
|
|
|
}
|