From 79281e0d4dbd82c8352d4e6237da428ac5563495 Mon Sep 17 00:00:00 2001
From: Alireza <mr.toghyiani@icloud.com>
Date: Wed, 25 Oct 2023 12:28:07 -0400
Subject: [PATCH] fix menu list icon size issue in iOS 17

Change-Id: I71991cf776361263c5384ef6f4b64c0027540fd6
---
 Ring/Ring/Extensions/UIImage+Helpers.swift                    | 4 ++--
 .../Conversations/SmartList/SmartlistViewController.swift     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Ring/Ring/Extensions/UIImage+Helpers.swift b/Ring/Ring/Extensions/UIImage+Helpers.swift
index be529a1ff..d45750cbc 100644
--- a/Ring/Ring/Extensions/UIImage+Helpers.swift
+++ b/Ring/Ring/Extensions/UIImage+Helpers.swift
@@ -225,8 +225,8 @@ extension UIImage {
         return newSize
     }
 
-    func resizeImageWith(newSize: CGSize) -> UIImage? {
-        UIGraphicsBeginImageContextWithOptions(newSize, true, 0)
+    func resizeImageWith(newSize: CGSize, opaque: Bool = true) -> UIImage? {
+        UIGraphicsBeginImageContextWithOptions(newSize, opaque, 0)
         draw(in: CGRect(origin: CGPoint(x: 0, y: 0), size: newSize))
         let newImage = UIGraphicsGetImageFromCurrentImageContext()
         UIGraphicsEndImageContext()
diff --git a/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.swift b/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.swift
index 38c32a502..5cc022fb0 100644
--- a/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.swift
+++ b/Ring/Ring/Features/Conversations/SmartList/SmartlistViewController.swift
@@ -682,7 +682,7 @@ extension SmartlistViewController {
     // MARK: - Action creation functions
 
     private var configuration: UIImage.SymbolConfiguration {
-        return UIImage.SymbolConfiguration(pointSize: 40, weight: .regular, scale: .large)
+        return UIImage.SymbolConfiguration(scale: .medium)
     }
 
     private func createSwarmAction() -> UIAction {
@@ -721,7 +721,7 @@ extension SmartlistViewController {
     }
 
     private func aboutJamiAction() -> UIAction {
-        let image = UIImage(asset: Asset.jamiIcon)
+        let image = UIImage(asset: Asset.jamiIcon)?.resizeImageWith(newSize: CGSize(width: 22, height: 22), opaque: false)
         return UIAction(title: L10n.Smartlist.aboutJami, image: image, identifier: nil, discoverabilityTitle: nil, attributes: [], state: .off) { _ in
             SharedActionsPresenter.showAboutJamiAlert(onViewController: self)
         }
-- 
GitLab