Skip to content

Commit

Permalink
IOS-1749 Merge branch 'develop' into ios-1749-refactor-to-work-with-a…
Browse files Browse the repository at this point in the history
…ctiveviewid
  • Loading branch information
joe-pusya committed Sep 15, 2023
2 parents bdb13a7 + 7b301f2 commit f8c6230
Show file tree
Hide file tree
Showing 80 changed files with 40 additions and 1,417 deletions.
152 changes: 14 additions & 138 deletions Anytype.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

22 changes: 0 additions & 22 deletions Anytype/Generated/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ internal enum Loc {
internal static let amber = Loc.tr("Localizable", "Amber", fallback: "Amber")
/// Amber background
internal static let amberBackground = Loc.tr("Localizable", "Amber background", fallback: "Amber background")
/// Understanding how people use Anytype helps us improve the product. This version of Anytype includes the analytics code that protects your privacy.
/// It doesn't record the actual document's content but still allows us to understand how you use Anytype.
/// Stay subscribed to our mailing list, as we will soon announce a new release that enables you to opt-out.
internal static let analyticsConstentText = Loc.tr("Localizable", "Analytics constent text", fallback: "Understanding how people use Anytype helps us improve the product. This version of Anytype includes the analytics code that protects your privacy.\nIt doesn't record the actual document's content but still allows us to understand how you use Anytype.\nStay subscribed to our mailing list, as we will soon announce a new release that enables you to opt-out.")
/// Anytype Library
internal static let anytypeLibrary = Loc.tr("Localizable", "Anytype Library", fallback: "Anytype Library")
/// Anytype node is not connected
Expand Down Expand Up @@ -212,8 +208,6 @@ internal enum Loc {
internal static let enterText = Loc.tr("Localizable", "Enter text", fallback: "Enter text")
/// Enter value
internal static let enterValue = Loc.tr("Localizable", "Enter value", fallback: "Enter value")
/// Enter your name
internal static let enterYourName = Loc.tr("Localizable", "Enter your name", fallback: "Enter your name")
/// Error creating wallet
internal static let errorCreatingWallet = Loc.tr("Localizable", "Error creating wallet", fallback: "Error creating wallet")
/// Error select account
Expand Down Expand Up @@ -300,8 +294,6 @@ internal enum Loc {
internal static let name = Loc.tr("Localizable", "Name", fallback: "Name")
/// New
internal static let new = Loc.tr("Localizable", "New", fallback: "New")
/// New profile
internal static let newProfile = Loc.tr("Localizable", "New profile", fallback: "New profile")
/// New relation
internal static let newRelation = Loc.tr("Localizable", "New relation", fallback: "New relation")
/// No connection
Expand Down Expand Up @@ -340,10 +332,6 @@ internal enum Loc {
internal static let openObject = Loc.tr("Localizable", "Open object", fallback: "Open object")
/// Open source
internal static let openSource = Loc.tr("Localizable", "Open source", fallback: "Open source")
/// or type your recovery phrase
internal static let orTypeYourRecoveryPhrase = Loc.tr("Localizable", "or type your recovery phrase", fallback: "or type your recovery phrase")
/// With Anytype you can write notes and documents, manage tasks and save important content from the web.
internal static let organizeEverythingDescription = Loc.tr("Localizable", "OrganizeEverythingDescription", fallback: "With Anytype you can write notes and documents, manage tasks and save important content from the web.")
/// Other
internal static let other = Loc.tr("Localizable", "Other", fallback: "Other")
/// Other relations
Expand Down Expand Up @@ -437,8 +425,6 @@ internal enum Loc {
/// Setting up encrypted storage
/// Please wait
internal static let settingUpEncryptedStoragePleaseWait = Loc.tr("Localizable", "Setting up encrypted storage\nPlease wait", fallback: "Setting up encrypted storage\nPlease wait")
/// Setting up the wallet
internal static let settingUpTheWallet = Loc.tr("Localizable", "Setting up the wallet", fallback: "Setting up the wallet")
/// Settings
internal static let settings = Loc.tr("Localizable", "Settings", fallback: "Settings")
/// Shared
Expand Down Expand Up @@ -531,8 +517,6 @@ internal enum Loc {
internal static let wallpaper = Loc.tr("Localizable", "Wallpaper", fallback: "Wallpaper")
/// Web pages
internal static let webPages = Loc.tr("Localizable", "Web pages", fallback: "Web pages")
/// Welcome to Anytype
internal static let welcomeToAnytype = Loc.tr("Localizable", "Welcome to Anytype", fallback: "Welcome to Anytype")
/// Yellow
internal static let yellow = Loc.tr("Localizable", "Yellow", fallback: "Yellow")
/// Yellow background
Expand Down Expand Up @@ -1656,12 +1640,6 @@ internal enum Loc {
internal static let text = Loc.tr("Localizable", "Sharing.URL.Text", fallback: "Text block")
}
}
internal enum SignUp {
internal enum InvintationCode {
/// Invitation code
internal static let placeholder = Loc.tr("Localizable", "SignUp.InvintationCode.Placeholder", fallback: "Invitation code")
}
}
internal enum SimpleTableMenu {
internal enum Item {
/// Clear
Expand Down
26 changes: 8 additions & 18 deletions Anytype/Resources/Strings/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -178,23 +178,20 @@
"Keychain.SeedPhrasePlaceholder" = "witch collapse practice feed shame open despair creek road again ice least lake tree young address brain despair";

// Auth
"Welcome to Anytype" = "Welcome to Anytype";
"OrganizeEverythingDescription" = "With Anytype you can write notes and documents, manage tasks and save important content from the web.";
"Sign up" = "Sign up";
"Login" = "Login";
"Restore secret phrase from keychain" = "Restore Recovery Phrase from the keychain";
"or type your recovery phrase" = "or type your recovery phrase";
"Setting up the wallet" = "Setting up the wallet";
"Enter your name" = "Enter your name";
"New profile" = "New profile";
"Create" = "Create";
"Scan QR code" = "Scan QR code";
"Auth.CameraPermissionTitle" = "Please allow access";
"Analytics constent text" = "Understanding how people use Anytype helps us improve the product. This version of Anytype includes the analytics code that protects your privacy.\nIt doesn't record the actual document's content but still allows us to understand how you use Anytype.\nStay subscribed to our mailing list, as we will soon announce a new release that enables you to opt-out.";
"Restore secret phrase from keychain" = "Restore Recovery Phrase from the keychain";
"Auth.LogIn" = "I already have one";
"Auth.Join" = "Generate new account";
"Auth.Welcome.Subtitle" = "Anytype is your safe space to write, plan, think and organise everything that matters to you.";
"Auth.Caption.Privacy.Text" = "By continuing you agree to [Terms of Use](%@) and [Privacy Policy](%@)";
"Auth.Next" = "Next";

"Account recover error" = "Account recover error, try again";
"Account recover error no internet" = "Account recover error, probably no internet connection";
"SignUp.InvintationCode.Placeholder" = "Invitation code";

// Auth Errors
"Error creating wallet" = "Error creating wallet";
Expand All @@ -203,14 +200,7 @@

"Search for language" = "Search for language";

// New Auth
"Auth.LogIn" = "I already have one";
"Auth.Join" = "Generate new account";
"Auth.Welcome.Subtitle" = "Anytype is your safe space to write, plan, think and organise everything that matters to you.";
"Auth.Caption.Privacy.Text" = "By continuing you agree to [Terms of Use](%@) and [Privacy Policy](%@)";
"Auth.Next" = "Next";

// New Auth - Join flow
// Auth - Join flow

"Auth.JoinFlow.Key.Title" = "Save your Recovery Phrase";
"Auth.JoinFlow.Key.Description" = "It’s a novel way of authentication that gives you full ownership over your account and data.";
Expand Down Expand Up @@ -238,7 +228,7 @@
"Auth.JoinFlow.Setting.Space.Title" = "Setting up your personal space";
"Auth.JoinFlow.Personal.Space.Title" = "Personal Space";

// New Auth - Login flow
// Auth - Login flow
"Auth.LoginFlow.Use.Keychain.Title" = "Use keychain";
"Auth.LoginFlow.Or" = "OR";
"Auth.LoginFlow.Textfield.Placeholder" = "Type your recovery phrase";
Expand Down
2 changes: 0 additions & 2 deletions Anytype/Sources/Analytics/AnalyticsConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ enum AnalyticsEventsName {
static let logout = "LogOut"
static let deleteAccount = "DeleteAccount"
static let cancelDeletion = "CancelDeletion"

// New auth events
static let screenOnboarding = "ScreenOnboarding"
static let clickOnboarding = "ClickOnboarding"
static let clickLogin = "ClickLogin"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import AVFoundation
import UIKit
import AnytypeCore


final class AudioPlaybackConfigurator: AppConfiguratorProtocol {

private let audioSessionService = ServiceLocator.shared.audioSessionService()

func configure() {
if FeatureFlags.fixAudioSession {
audioSessionService.setCategorypPlaybackMixWithOthers()
} else {
audioSessionService.setCategorypPlaybackLegacy()
}
audioSessionService.setCategorypPlaybackMixWithOthers()
UIApplication.shared.beginReceivingRemoteControlEvents()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ final class ApplicationCoordinatorAssembly: ApplicationCoordinatorAssemblyProtoc
let windowManager = WindowManager(
viewControllerProvider: uiHelpersDI.viewControllerProvider(),
authCoordinatorAssembly: coordinatorsDI.authorization(),
legacyAuthViewAssembly: coordinatorsDI.legacyAuthViewAssembly(),
homeWidgetsCoordinatorAssembly: coordinatorsDI.homeWidgets(),
applicationStateService: serviceLocator.applicationStateService()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ final class WindowManager {

private let viewControllerProvider: ViewControllerProviderProtocol
private let authCoordinatorAssembly: AuthCoordinatorAssemblyProtocol
private let legacyAuthViewAssembly: LegacyAuthViewAssembly
private let homeWidgetsCoordinatorAssembly: HomeWidgetsCoordinatorAssemblyProtocol
private let applicationStateService: ApplicationStateServiceProtocol

Expand All @@ -21,13 +20,11 @@ final class WindowManager {
init(
viewControllerProvider: ViewControllerProviderProtocol,
authCoordinatorAssembly: AuthCoordinatorAssemblyProtocol,
legacyAuthViewAssembly: LegacyAuthViewAssembly,
homeWidgetsCoordinatorAssembly: HomeWidgetsCoordinatorAssemblyProtocol,
applicationStateService: ApplicationStateServiceProtocol
) {
self.viewControllerProvider = viewControllerProvider
self.authCoordinatorAssembly = authCoordinatorAssembly
self.legacyAuthViewAssembly = legacyAuthViewAssembly
self.homeWidgetsCoordinatorAssembly = homeWidgetsCoordinatorAssembly
self.applicationStateService = applicationStateService
}
Expand All @@ -43,15 +40,10 @@ final class WindowManager {

@MainActor
func showAuthWindow() {
if FeatureFlags.newAuthorization {
let coordinator = authCoordinatorAssembly.make()
self.authCoordinator = coordinator
let authView = coordinator.startFlow()
startNewRootView(authView, preferredColorScheme: .dark, disableBackSwipe: true)
} else {
let legacyAuthView = legacyAuthViewAssembly.createAuthView()
startNewRootView(legacyAuthView)
}
let coordinator = authCoordinatorAssembly.make()
self.authCoordinator = coordinator
let authView = coordinator.startFlow()
startNewRootView(authView, preferredColorScheme: .dark, disableBackSwipe: true)
}

func showLaunchWindow() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import SwiftUI


extension View {
func errorToast(isShowing: Binding<Bool>, errorText: String, onOkPressed: @escaping () -> () = {}) -> some View {
LegacyErrorAlertView(isShowing: isShowing, errorText: errorText, presenting: self, onOkPressed: onOkPressed)
}

extension View {
func alertView(isShowing: Binding<Bool>, errorText: String, onButtonTap: @escaping () -> () = {}) -> some View {
AlertView(isShowing: isShowing, errorText: errorText, presenting: self, onButtonTap: onButtonTap)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ final class CoordinatorsDI: CoordinatorsDIProtocol {
return LoginFlowCoordinatorAssembly(modulesDI: modulesDI, uiHelpersDI: uiHelpersDI)
}

func legacyAuthViewAssembly() -> LegacyAuthViewAssembly {
return LegacyAuthViewAssembly(serviceLocator: serviceLocator)
}

func setViewSettings() -> SetViewSettingsCoordinatorAssemblyProtocol {
return SetViewSettingsCoordinatorAssembly(modulesDI: modulesDI, coordinatorsDI: self)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ protocol CoordinatorsDIProtocol: AnyObject {
// Now like a coordinator. Migrate to isolated modules
func browser() -> EditorBrowserAssembly
func editor() -> EditorAssembly
func legacyAuthViewAssembly() -> LegacyAuthViewAssembly
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit f8c6230

Please sign in to comment.