From 7380d28d745ae16bb083c088ff41a551c625b362 Mon Sep 17 00:00:00 2001
From: CMK
Date: Sat, 7 May 2022 15:12:00 +0800
Subject: [PATCH 1/2] fix: profile bio line break get trimmed issue. resolve
#311
---
Mastodon/Scene/Profile/Header/ProfileHeaderViewModel.swift | 5 ++++-
Mastodon/Scene/Profile/ProfileViewController.swift | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/Mastodon/Scene/Profile/Header/ProfileHeaderViewModel.swift b/Mastodon/Scene/Profile/Header/ProfileHeaderViewModel.swift
index 7f7b0dd0..8bdce2a6 100644
--- a/Mastodon/Scene/Profile/Header/ProfileHeaderViewModel.swift
+++ b/Mastodon/Scene/Profile/Header/ProfileHeaderViewModel.swift
@@ -90,7 +90,10 @@ extension ProfileHeaderViewModel {
extension ProfileHeaderViewModel {
static func normalize(note: String?) -> String? {
- guard let note = note?.trimmingCharacters(in: .whitespacesAndNewlines),!note.isEmpty else {
+ let _note = note?.replacingOccurrences(of: "
|
", with: "\u{2028}", options: .regularExpression, range: nil)
+ .replacingOccurrences(of: "
", with: "\u{2029}", range: nil)
+ .trimmingCharacters(in: .whitespacesAndNewlines)
+ guard let note = _note, !note.isEmpty else {
return nil
}
diff --git a/Mastodon/Scene/Profile/ProfileViewController.swift b/Mastodon/Scene/Profile/ProfileViewController.swift
index 021f62ed..b376ebcf 100644
--- a/Mastodon/Scene/Profile/ProfileViewController.swift
+++ b/Mastodon/Scene/Profile/ProfileViewController.swift
@@ -953,6 +953,7 @@ extension ProfileViewController: ProfileHeaderViewDelegate {
viewModel.isUpdating.value = true
Task {
do {
+ // TODO: handle error
_ = try await viewModel.updateProfileInfo(
headerProfileInfo: profileHeaderViewModel.editProfileInfo,
aboutProfileInfo: profileAboutViewModel.editProfileInfo
From 238945d9b11fe8e8f675627c9cfdaa34f5a5837e Mon Sep 17 00:00:00 2001
From: CMK
Date: Sat, 7 May 2022 15:13:07 +0800
Subject: [PATCH 2/2] chore: update version to 1.4.1 (126)
---
AppShared/Info.plist | 2 +-
Mastodon.xcodeproj/project.pbxproj | 36 +++++++++----------
.../xcschemes/xcschememanagement.plist | 6 ++--
Mastodon/Info.plist | 2 +-
MastodonIntent/Info.plist | 2 +-
MastodonTests/Info.plist | 2 +-
MastodonUITests/Info.plist | 2 +-
NotificationService/Info.plist | 2 +-
ShareActionExtension/Info.plist | 2 +-
9 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/AppShared/Info.plist b/AppShared/Info.plist
index 973b2405..92f44289 100644
--- a/AppShared/Info.plist
+++ b/AppShared/Info.plist
@@ -17,6 +17,6 @@
CFBundleShortVersionString
1.4.1
CFBundleVersion
- 125
+ 126
diff --git a/Mastodon.xcodeproj/project.pbxproj b/Mastodon.xcodeproj/project.pbxproj
index c8a0a2bc..d5f5cbd7 100644
--- a/Mastodon.xcodeproj/project.pbxproj
+++ b/Mastodon.xcodeproj/project.pbxproj
@@ -4707,7 +4707,7 @@
CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets";
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = Mastodon/Info.plist;
@@ -4737,7 +4737,7 @@
CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets";
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = Mastodon/Info.plist;
@@ -4845,11 +4845,11 @@
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 125;
+ DYLIB_CURRENT_VERSION = 126;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = AppShared/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -4876,11 +4876,11 @@
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 125;
+ DYLIB_CURRENT_VERSION = 126;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = AppShared/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -4904,7 +4904,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = MastodonIntent/MastodonIntent.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = MastodonIntent/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
@@ -4928,7 +4928,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = MastodonIntent/MastodonIntent.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = MastodonIntent/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
@@ -4952,7 +4952,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = ShareActionExtension/ShareActionExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = ShareActionExtension/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
@@ -4976,7 +4976,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = ShareActionExtension/ShareActionExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = ShareActionExtension/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
@@ -5063,7 +5063,7 @@
CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets";
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = Mastodon/Info.plist;
@@ -5130,11 +5130,11 @@
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 125;
+ DYLIB_CURRENT_VERSION = 126;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = AppShared/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -5158,7 +5158,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = NotificationService/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
@@ -5181,7 +5181,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = ShareActionExtension/ShareActionExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = ShareActionExtension/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
@@ -5205,7 +5205,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = MastodonIntent/MastodonIntent.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = MastodonIntent/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
@@ -5229,7 +5229,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = NotificationService/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
@@ -5252,7 +5252,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements;
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 125;
+ CURRENT_PROJECT_VERSION = 126;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = NotificationService/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
diff --git a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist
index 75b20985..07a847a0 100644
--- a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist
+++ b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -109,7 +109,7 @@
MastodonIntent.xcscheme_^#shared#^_
orderHint
- 26
+ 28
MastodonIntents.xcscheme_^#shared#^_
@@ -124,12 +124,12 @@
NotificationService.xcscheme_^#shared#^_
orderHint
- 28
+ 27
ShareActionExtension.xcscheme_^#shared#^_
orderHint
- 27
+ 26
SuppressBuildableAutocreation
diff --git a/Mastodon/Info.plist b/Mastodon/Info.plist
index 14588c75..c93fd9a6 100644
--- a/Mastodon/Info.plist
+++ b/Mastodon/Info.plist
@@ -43,7 +43,7 @@
CFBundleVersion
- 125
+ 126
ITSAppUsesNonExemptEncryption
LSApplicationQueriesSchemes
diff --git a/MastodonIntent/Info.plist b/MastodonIntent/Info.plist
index 58d21c7b..3f163094 100644
--- a/MastodonIntent/Info.plist
+++ b/MastodonIntent/Info.plist
@@ -19,7 +19,7 @@
CFBundleShortVersionString
1.4.1
CFBundleVersion
- 125
+ 126
NSExtension
NSExtensionAttributes
diff --git a/MastodonTests/Info.plist b/MastodonTests/Info.plist
index 973b2405..92f44289 100644
--- a/MastodonTests/Info.plist
+++ b/MastodonTests/Info.plist
@@ -17,6 +17,6 @@
CFBundleShortVersionString
1.4.1
CFBundleVersion
- 125
+ 126
diff --git a/MastodonUITests/Info.plist b/MastodonUITests/Info.plist
index 973b2405..92f44289 100644
--- a/MastodonUITests/Info.plist
+++ b/MastodonUITests/Info.plist
@@ -17,6 +17,6 @@
CFBundleShortVersionString
1.4.1
CFBundleVersion
- 125
+ 126
diff --git a/NotificationService/Info.plist b/NotificationService/Info.plist
index c65337a3..f074db82 100644
--- a/NotificationService/Info.plist
+++ b/NotificationService/Info.plist
@@ -19,7 +19,7 @@
CFBundleShortVersionString
1.4.1
CFBundleVersion
- 125
+ 126
NSExtension
NSExtensionPointIdentifier
diff --git a/ShareActionExtension/Info.plist b/ShareActionExtension/Info.plist
index e1d9a940..31c7447f 100644
--- a/ShareActionExtension/Info.plist
+++ b/ShareActionExtension/Info.plist
@@ -19,7 +19,7 @@
CFBundleShortVersionString
1.4.1
CFBundleVersion
- 125
+ 126
NSExtension
NSExtensionAttributes