From f7f1ad5bdee5e62adbabc18ec7809373e3bf666b Mon Sep 17 00:00:00 2001 From: Eugene Yatsenko Date: Wed, 31 Jan 2024 18:27:18 +0100 Subject: [PATCH] chore: resolve PR commnets --- Core/Core/Network/DownloadManager.swift | 10 +++++----- .../Presentation/Downloads/DownloadsViewModel.swift | 2 +- OpenEdX/Data/CorePersistence.swift | 8 ++++---- Profile/Profile/uk.lproj/Localizable.strings | 1 - 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Core/Core/Network/DownloadManager.swift b/Core/Core/Network/DownloadManager.swift index 96bc51fff..4c2e6879f 100644 --- a/Core/Core/Network/DownloadManager.swift +++ b/Core/Core/Network/DownloadManager.swift @@ -234,7 +234,7 @@ public class DownloadManager: DownloadManagerProtocol { try FileManager.default.removeItem(at: fileUrl) } } catch { - NSLog("Error deleting file: \(error.localizedDescription)") + debugLog("Error deleting file: \(error.localizedDescription)") } } currentDownloadEventPublisher.send(.courseCanceled(courseId)) @@ -251,7 +251,7 @@ public class DownloadManager: DownloadManagerProtocol { try FileManager.default.removeItem(at: fileURL) } } catch { - NSLog("Error deleting file: \(error.localizedDescription)") + debugLog("Error deleting file: \(error.localizedDescription)") } } } @@ -263,7 +263,7 @@ public class DownloadManager: DownloadManagerProtocol { do { try FileManager.default.removeItem(at: fileURL) } catch { - NSLog("Error deleting All files: \(error.localizedDescription)") + debugLog("Error deleting All files: \(error.localizedDescription)") } } } @@ -407,7 +407,7 @@ public class DownloadManager: DownloadManagerProtocol { ) return URL(fileURLWithPath: directoryURL.path) } catch { - print(error.localizedDescription) + debugLog(error.localizedDescription) return nil } } @@ -418,7 +418,7 @@ public class DownloadManager: DownloadManagerProtocol { do { try data.write(to: fileURL) } catch { - NSLog("SaveFile Error", error.localizedDescription) + debugLog("SaveFile Error", error.localizedDescription) } } } diff --git a/Course/Course/Presentation/Downloads/DownloadsViewModel.swift b/Course/Course/Presentation/Downloads/DownloadsViewModel.swift index 9d9f5e165..b71566f58 100644 --- a/Course/Course/Presentation/Downloads/DownloadsViewModel.swift +++ b/Course/Course/Presentation/Downloads/DownloadsViewModel.swift @@ -43,7 +43,7 @@ final class DownloadsViewModel: ObservableObject { try await manager.cancelDownloading(task: task) downloads.removeAll(where: { $0.id == task.id }) } catch { - print(error) + debugLog(error) } } diff --git a/OpenEdX/Data/CorePersistence.swift b/OpenEdX/Data/CorePersistence.swift index fbf797769..1070011dd 100644 --- a/OpenEdX/Data/CorePersistence.swift +++ b/OpenEdX/Data/CorePersistence.swift @@ -191,7 +191,7 @@ public class CorePersistence: CorePersistenceProtocol { do { try context.save() } catch { - print("⛔️⛔️⛔️⛔️⛔️", error) + debugLog("⛔️⛔️⛔️⛔️⛔️", error) } } } @@ -205,10 +205,10 @@ public class CorePersistence: CorePersistenceProtocol { for record in records { context.delete(record) try context.save() - print("File erased successfully") + debugLog("File erased successfully") } } catch { - print("Error fetching records: \(error.localizedDescription)") + debugLog("Error fetching records: \(error.localizedDescription)") } } } @@ -229,7 +229,7 @@ public class CorePersistence: CorePersistenceProtocol { do { try context.save() } catch { - print("⛔️⛔️⛔️⛔️⛔️", error) + debugLog("⛔️⛔️⛔️⛔️⛔️", error) } } } diff --git a/Profile/Profile/uk.lproj/Localizable.strings b/Profile/Profile/uk.lproj/Localizable.strings index 2c33a411e..b3f91c924 100644 --- a/Profile/Profile/uk.lproj/Localizable.strings +++ b/Profile/Profile/uk.lproj/Localizable.strings @@ -62,7 +62,6 @@ "SETTINGS.WIFI_TITLE" = "Тільки Wi-fi"; "SETTINGS.WIFI_DESCRIPTION" = "Завантажувати відео, лише коли Wi-Fi увімкнено"; "SETTINGS.VIDEO_QUALITY_TITLE" = "Якість потокового відео"; -"SETTINGS.VIDEO_DOWNLOAD_QUALITY_TITLE" = "Video download quality"; "SETTINGS.VIDEO_QUALITY_DESCRIPTION" = "Авто (Рекомендовано)"; "SETTINGS.QUALITY_AUTO_TITLE" = "Авто";