From 8a3b2ac84fde5d2ee03eba4e900a4670c46ef57d Mon Sep 17 00:00:00 2001 From: Nam Thanh Nguyen <35841468+jkelol111@users.noreply.github.com> Date: Tue, 16 Feb 2021 22:13:22 +0800 Subject: [PATCH] :sparkles: Fix character encoding problem. --- Iamages/Iamages/IamagesAPI/IamagesAPI.swift | 2 +- .../ImageDetailsEditInformationScreen.swift | 5 +---- .../Screens/SettingsScreen/SettingsScreen.swift | 2 +- .../Iamages/Screens/UploadScreen/UploadScreen.swift | 11 ++--------- Iamages/Iamages/en.lproj/Localizable.strings | 1 - Iamages/Iamages/vi.lproj/Localizable.strings | 1 - 6 files changed, 5 insertions(+), 17 deletions(-) diff --git a/Iamages/Iamages/IamagesAPI/IamagesAPI.swift b/Iamages/Iamages/IamagesAPI/IamagesAPI.swift index 0b49821..3d20301 100644 --- a/Iamages/Iamages/IamagesAPI/IamagesAPI.swift +++ b/Iamages/Iamages/IamagesAPI/IamagesAPI.swift @@ -61,7 +61,7 @@ class IamagesAPI { request.httpMethod = method AF.request(request) .validate() - .responseString(completionHandler: { response in + .responseString(encoding: .utf8, completionHandler: { response in switch (response.result) { case .success: seal.fulfill(response.value!) diff --git a/Iamages/Iamages/Screens/ImageDetailsScreen/ImageDetailsEditInformationScreen.swift b/Iamages/Iamages/Screens/ImageDetailsScreen/ImageDetailsEditInformationScreen.swift index 9f74357..0b4f4db 100644 --- a/Iamages/Iamages/Screens/ImageDetailsScreen/ImageDetailsEditInformationScreen.swift +++ b/Iamages/Iamages/Screens/ImageDetailsScreen/ImageDetailsEditInformationScreen.swift @@ -34,10 +34,7 @@ struct ImageDetailsEditInformationScreen: View { Button(action: { self.saveNewFile() }) { - HStack { - Text("Save") - Image(systemName: "square.and.arrow.down") - } + Text("Save") }.disabled(self.isBusy) } ToolbarItem(placement: .navigationBarTrailing) { diff --git a/Iamages/Iamages/Screens/SettingsScreen/SettingsScreen.swift b/Iamages/Iamages/Screens/SettingsScreen/SettingsScreen.swift index 123f076..3473068 100644 --- a/Iamages/Iamages/Screens/SettingsScreen/SettingsScreen.swift +++ b/Iamages/Iamages/Screens/SettingsScreen/SettingsScreen.swift @@ -39,7 +39,7 @@ struct SettingsScreen: View { Text("App settings") }) } - Section(header: Text("About"), footer: Text("Iamages iOS 2.1.0 (1)")) { + Section(header: Text("About"), footer: Text("Iamages iOS 2.1.0 (2)")) { Link(destination: URL(string: api.IAMAGES_APIROOT + "private/tos")!) { HStack { Text("Terms of Service") diff --git a/Iamages/Iamages/Screens/UploadScreen/UploadScreen.swift b/Iamages/Iamages/Screens/UploadScreen/UploadScreen.swift index 5966c26..a1b37b2 100644 --- a/Iamages/Iamages/Screens/UploadScreen/UploadScreen.swift +++ b/Iamages/Iamages/Screens/UploadScreen/UploadScreen.swift @@ -35,11 +35,7 @@ struct UploadScreen: View { Button(action: { self.isPhotosPickerPresented = true }) { - HStack { - Image(systemName: "rectangle.stack.badge.plus") - Text("Select") - } - + Image(systemName: "plus") }.sheet(isPresented: self.$isPhotosPickerPresented) { PhotoPickerComponent(configuration: self.pickerConfig, pickerResultInformation: self.$pickedFileInformation, @@ -50,10 +46,7 @@ struct UploadScreen: View { Button(action: { self.isUploadedFilesSheetPresented = true }) { - HStack { - Text("Upload") - Image(systemName: "square.and.arrow.up.on.square") - } + Image(systemName: "arrow.up") }.sheet(isPresented: self.$isUploadedFilesSheetPresented) { UploadedFilesSheet(pickedFileInformation: self.$pickedFileInformation) diff --git a/Iamages/Iamages/en.lproj/Localizable.strings b/Iamages/Iamages/en.lproj/Localizable.strings index 90602be..85fe6d0 100644 --- a/Iamages/Iamages/en.lproj/Localizable.strings +++ b/Iamages/Iamages/en.lproj/Localizable.strings @@ -47,7 +47,6 @@ "Deleting user" = "Deleting user"; "Delete failed" = "Delete failed"; -"Select" = "Select"; "Private file toggle will only apply if you are logged in." = "Private file toggle will only apply if you are logged in."; "Uploaded files" = "Uploaded files"; "Upload failed" = "Upload failed"; diff --git a/Iamages/Iamages/vi.lproj/Localizable.strings b/Iamages/Iamages/vi.lproj/Localizable.strings index 864ee9c..69d1ddd 100644 --- a/Iamages/Iamages/vi.lproj/Localizable.strings +++ b/Iamages/Iamages/vi.lproj/Localizable.strings @@ -47,7 +47,6 @@ "Deleting user" = "Đang xóa người dùng"; "Delete failed" = "Xóa không thành công"; -"Select" = "Lựa chọn"; "Private file toggle will only apply if you are logged in." = "Chuyển đổi ảnh riêng tư sẽ chỉ áp dụng nếu bạn đã đăng nhập."; "Uploaded files" = "Ảnh đã tải lên"; "Upload failed" = "Tải ảnh lên thất bại";