diff --git a/IceCubesApp.xcodeproj/project.pbxproj b/IceCubesApp.xcodeproj/project.pbxproj index b36c1031..bbfd46fa 100644 --- a/IceCubesApp.xcodeproj/project.pbxproj +++ b/IceCubesApp.xcodeproj/project.pbxproj @@ -652,7 +652,7 @@ DEVELOPMENT_TEAM = Z6P74P6T99; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = IceCubesShareExtension/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = IceCubesShareExtension; + INFOPLIST_KEY_CFBundleDisplayName = "Ice Cubes"; INFOPLIST_KEY_NSHumanReadableCopyright = ""; IPHONEOS_DEPLOYMENT_TARGET = 16.1; LD_RUNPATH_SEARCH_PATHS = ( @@ -682,7 +682,7 @@ DEVELOPMENT_TEAM = Z6P74P6T99; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = IceCubesShareExtension/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = IceCubesShareExtension; + INFOPLIST_KEY_CFBundleDisplayName = "Ice Cubes"; INFOPLIST_KEY_NSHumanReadableCopyright = ""; IPHONEOS_DEPLOYMENT_TARGET = 16.1; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift b/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift index ef92cfc2..691cc345 100644 --- a/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift +++ b/IceCubesApp/App/Tabs/Settings/AddAccountsView.swift @@ -7,6 +7,7 @@ import Network import NukeUI import Shimmer import SwiftUI +import SafariServices struct AddAccountView: View { @Environment(\.dismiss) private var dismiss @@ -24,6 +25,7 @@ struct AddAccountView: View { @State private var signInClient: Client? @State private var instances: [InstanceSocial] = [] @State private var instanceFetchError: String? + @State private var oauthURL: URL? private let instanceNamePublisher = PassthroughSubject() @@ -100,6 +102,9 @@ struct AddAccountView: View { await continueSignIn(url: url) } }) + .sheet(item: $oauthURL, content: { url in + SafariView(url: url) + }) } } @@ -176,7 +181,7 @@ struct AddAccountView: View { do { signInClient = .init(server: instanceName) if let oauthURL = try await signInClient?.oauthURL() { - await UIApplication.shared.open(oauthURL) + self.oauthURL = oauthURL } else { isSigninIn = false } @@ -191,6 +196,7 @@ struct AddAccountView: View { return } do { + oauthURL = nil let oauthToken = try await client.continueOauthFlow(url: url) appAccountsManager.add(account: AppAccount(server: client.server, oauthToken: oauthToken)) Task { @@ -199,7 +205,20 @@ struct AddAccountView: View { isSigninIn = false dismiss() } catch { + oauthURL = nil isSigninIn = false } } } + +struct SafariView: UIViewControllerRepresentable { + let url: URL + + func makeUIViewController(context: UIViewControllerRepresentableContext) -> SFSafariViewController { + SFSafariViewController(url: url) + } + + func updateUIViewController(_ uiViewController: SFSafariViewController, context: UIViewControllerRepresentableContext) { + + } +} diff --git a/Packages/Conversations/Sources/Conversations/List/ConversationsListRow.swift b/Packages/Conversations/Sources/Conversations/List/ConversationsListRow.swift index 2d47b75b..3f7fc640 100644 --- a/Packages/Conversations/Sources/Conversations/List/ConversationsListRow.swift +++ b/Packages/Conversations/Sources/Conversations/List/ConversationsListRow.swift @@ -19,8 +19,10 @@ struct ConversationsListRow: View { AvatarView(url: conversation.accounts.first!.avatar) VStack(alignment: .leading, spacing: 4) { HStack { - Text(conversation.accounts.map { $0.safeDisplayName }.joined(separator: ", ")) - .font(.scaledHeadline) + EmojiTextApp(conversation.accounts.map { $0.safeDisplayName }.joined(separator: ", "), + emojis: conversation.accounts.flatMap{ $0.emojis }) + .font(.scaledSubheadline) + .fontWeight(.semibold) .foregroundColor(theme.labelColor) .multilineTextAlignment(.leading) Spacer()