marinofaggiana 4 years ago
parent
commit
df789490c1

+ 0 - 0
iOSClient/Images.xcassets/favorite.imageset/Contents.json → iOSClient/Images.xcassets/star.fill.imageset/Contents.json


+ 0 - 0
iOSClient/Images.xcassets/favorite.imageset/tabBarFavorites.pdf → iOSClient/Images.xcassets/star.fill.imageset/tabBarFavorites.pdf


+ 1 - 1
iOSClient/Main/Colleaction Common/NCCollectionCommon.swift

@@ -71,7 +71,7 @@ class NCCollectionCommon: NSObject, NCSelectDelegate {
         images.canShare = UIImage(named: "share")!.image(color: NCBrandColor.shared.graySoft, size: 50)
         images.shareByLink = UIImage(named: "sharebylink")!.image(color: NCBrandColor.shared.graySoft, size: 50)
         
-        images.favorite = UIImage(named: "favorite")!.image(color: NCBrandColor.shared.yellowFavorite, size: 50)
+        images.favorite = NCUtility.shared.loadImage(named: "star.fill", color: NCBrandColor.shared.yellowFavorite)
         images.comment = UIImage(named: "comment")!.image(color: NCBrandColor.shared.graySoft, size: 50)
         images.livePhoto = NCUtility.shared.loadImage(named: "livephoto", color: NCBrandColor.shared.textView)
         images.offlineFlag = UIImage.init(named: "offlineFlag")!

+ 1 - 1
iOSClient/Main/NCMainTabBar.swift

@@ -150,7 +150,7 @@ class NCMainTabBar: UITabBar {
         // Favorite
         if let item = items?[1] {
             item.title = NSLocalizedString("_favorites_", comment: "")
-            item.image = UIImage(named: "favorite")?.image(color: NCBrandColor.shared.brandElement, size: 25)
+            item.image = NCUtility.shared.loadImage(named: "star.fill", color: NCBrandColor.shared.brandElement, size: 25)
             item.selectedImage = item.image
         }
         

+ 1 - 1
iOSClient/Menu/NCCollectionViewCommon+Menu.swift

@@ -92,7 +92,7 @@ extension NCCollectionViewCommon {
         actions.append(
             NCMenuAction(
                 title: metadata.favorite ? NSLocalizedString("_remove_favorites_", comment: "") : NSLocalizedString("_add_favorites_", comment: ""),
-                icon: UIImage(named: "favorite")!.image(color: NCBrandColor.shared.yellowFavorite, size: 50),
+                icon: NCUtility.shared.loadImage(named: "star.fill", color: NCBrandColor.shared.yellowFavorite),
                 action: { menuAction in
                     NCNetworking.shared.favoriteMetadata(metadata, urlBase: self.appDelegate.urlBase) { (errorCode, errorDescription) in
                         if errorCode != 0 {

+ 1 - 1
iOSClient/Menu/NCViewer+Menu.swift

@@ -57,7 +57,7 @@ extension NCViewer {
         actions.append(
             NCMenuAction(
                 title: titleFavorite,
-                icon: UIImage(named: "favorite")!.image(color: NCBrandColor.shared.yellowFavorite, size: 50),
+                icon: NCUtility.shared.loadImage(named: "star.fill", color: NCBrandColor.shared.yellowFavorite),
                 action: { menuAction in
                     NCNetworking.shared.favoriteMetadata(metadata, urlBase: self.appDelegate.urlBase) { (errorCode, errorDescription) in
                         if errorCode != 0 {

+ 4 - 4
iOSClient/Share/NCSharePaging.swift

@@ -290,9 +290,9 @@ class NCSharePagingView: PagingView {
         headerView.fileName.text = metadata?.fileNameView
         headerView.fileName.textColor = NCBrandColor.shared.textView
         if metadata!.favorite {
-            headerView.favorite.setImage(UIImage.init(named: "favorite")!.image(color: NCBrandColor.shared.yellowFavorite, size: 20), for: .normal)
+            headerView.favorite.setImage(NCUtility.shared.loadImage(named: "star.fill", color: NCBrandColor.shared.yellowFavorite, size: 20), for: .normal)
         } else {
-            headerView.favorite.setImage(UIImage.init(named: "favorite")!.image(color: NCBrandColor.shared.textInfo, size: 20), for: .normal)
+            headerView.favorite.setImage(NCUtility.shared.loadImage(named: "star.fill", color: NCBrandColor.shared.textInfo, size: 20), for: .normal)
         }
         headerView.info.text = CCUtility.transformedSize(metadata!.size) + ", " + CCUtility.dateDiff(metadata!.date as Date)
         addSubview(headerView)
@@ -339,9 +339,9 @@ class NCShareHeaderView: UIView {
             NCNetworking.shared.favoriteMetadata(metadata, urlBase: appDelegate.urlBase) { (errorCode, errorDescription) in
                 if errorCode == 0 {
                     if !metadata.favorite {
-                        self.favorite.setImage(UIImage.init(named: "favorite")!.image(color: NCBrandColor.shared.yellowFavorite, size: 20), for: .normal)
+                        self.favorite.setImage(NCUtility.shared.loadImage(named: "star.fill", color: NCBrandColor.shared.yellowFavorite, size: 20), for: .normal)
                     } else {
-                        self.favorite.setImage(UIImage.init(named: "favorite")!.image(color: NCBrandColor.shared.textInfo, size: 20), for: .normal)
+                        self.favorite.setImage(NCUtility.shared.loadImage(named: "star.fill", color: NCBrandColor.shared.textInfo, size: 20), for: .normal)
                     }
                 } else {
                     NCContentPresenter.shared.messageNotification("_error_", description: errorDescription, delay: NCGlobal.shared.dismissAfterSecond, type: NCContentPresenter.messageType.error, errorCode: errorCode)