From c4c24f70533009261629be1ab16e438aad195e77 Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Fri, 18 Aug 2023 17:27:37 +1000 Subject: [PATCH] new home screen account created design --- Session/Home/HomeVC.swift | 157 +++---- .../Session/Hooray.imageset/Contents.json | 12 + .../account_created_mobile.pdf | 395 ++++++++++++++++++ .../Translations/de.lproj/Localizable.strings | 4 + .../Translations/en.lproj/Localizable.strings | 4 + .../Translations/es.lproj/Localizable.strings | 4 + .../Translations/fa.lproj/Localizable.strings | 4 + .../Translations/fi.lproj/Localizable.strings | 4 + .../Translations/fr.lproj/Localizable.strings | 4 + .../Translations/hi.lproj/Localizable.strings | 4 + .../Translations/hr.lproj/Localizable.strings | 4 + .../id-ID.lproj/Localizable.strings | 4 + .../Translations/it.lproj/Localizable.strings | 4 + .../Translations/ja.lproj/Localizable.strings | 4 + .../Translations/nl.lproj/Localizable.strings | 4 + .../Translations/pl.lproj/Localizable.strings | 4 + .../pt_BR.lproj/Localizable.strings | 4 + .../Translations/ru.lproj/Localizable.strings | 4 + .../Translations/si.lproj/Localizable.strings | 4 + .../Translations/sk.lproj/Localizable.strings | 4 + .../Translations/sv.lproj/Localizable.strings | 4 + .../Translations/th.lproj/Localizable.strings | 4 + .../vi-VN.lproj/Localizable.strings | 4 + .../zh-Hant.lproj/Localizable.strings | 4 + .../zh_CN.lproj/Localizable.strings | 4 + Session/Onboarding/PNModeView.swift | 2 +- Session/Onboarding/RecoveryPasswordView.swift | 11 +- SessionUIKit/Utilities/UIView+Utilities.swift | 8 + 28 files changed, 596 insertions(+), 77 deletions(-) create mode 100644 Session/Meta/Images.xcassets/Session/Hooray.imageset/Contents.json create mode 100644 Session/Meta/Images.xcassets/Session/Hooray.imageset/account_created_mobile.pdf diff --git a/Session/Home/HomeVC.swift b/Session/Home/HomeVC.swift index 21c87c49a..c364bb3ba 100644 --- a/Session/Home/HomeVC.swift +++ b/Session/Home/HomeVC.swift @@ -8,7 +8,7 @@ import SessionMessagingKit import SessionUtilitiesKit import SignalUtilitiesKit -final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewDataSource, UITableViewDelegate, SeedReminderViewDelegate { +final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewDataSource, UITableViewDelegate { private static let loadingHeaderHeight: CGFloat = 40 public static let newConversationButtonSize: CGFloat = 60 @@ -21,6 +21,7 @@ final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewData private var isLoadingMore: Bool = false private var isAutoLoadingNextPage: Bool = false private var viewHasAppeared: Bool = false + private var flow: Onboarding.Flow? // MARK: - SessionUtilRespondingViewController @@ -28,9 +29,9 @@ final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewData // MARK: - Intialization - init() { + init(flow: Onboarding.Flow? = nil) { Storage.shared.addObserver(viewModel.pagedDataObserver) - + self.flow = flow super.init(nibName: nil, bundle: nil) } @@ -46,28 +47,6 @@ final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewData private var tableViewTopConstraint: NSLayoutConstraint! - private lazy var seedReminderView: SeedReminderView = { - let result = SeedReminderView(hasContinueButton: true) - result.accessibilityLabel = "Recovery phrase reminder" - let title = "You're almost finished! 80%" - result.subtitle = "view_seed_reminder_subtitle_1".localized() - result.setProgress(0.8, animated: false) - result.delegate = self - result.isHidden = !self.viewModel.state.showViewedSeedBanner - - ThemeManager.onThemeChange(observer: result) { [weak result] _, primaryColor in - let attributedTitle = NSMutableAttributedString(string: title) - attributedTitle.addAttribute( - .foregroundColor, - value: primaryColor.color, - range: (title as NSString).range(of: "80%") - ) - result?.title = attributedTitle - } - - return result - }() - private lazy var loadingConversationsLabel: UILabel = { let result: UILabel = UILabel() result.translatesAutoresizingMaskIntoConstraints = false @@ -215,6 +194,56 @@ final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewData return result }() + private lazy var accountCreatedView: UIView = { + let image: UIImageView = UIImageView(image: UIImage(named: "Hooray")) + image.contentMode = .center + image.set(.height, to: 96) + + let accountCreatedLabel = UILabel() + accountCreatedLabel.font = .boldSystemFont(ofSize: Values.veryLargeFontSize) + accountCreatedLabel.text = "home_empty_state_account_created".localized() + accountCreatedLabel.themeTextColor = .textPrimary + accountCreatedLabel.textAlignment = .center + + let welcomeLabel = UILabel() + welcomeLabel.font = .systemFont(ofSize: Values.smallFontSize) + welcomeLabel.text = "home_empty_state_welcome".localized() + welcomeLabel.themeTextColor = .primary + welcomeLabel.textAlignment = .center + + let emptyConvoLabel = UILabel() + emptyConvoLabel.font = .boldSystemFont(ofSize: Values.mediumFontSize) + emptyConvoLabel.text = "home_empty_state_no_conversation".localized() + emptyConvoLabel.themeTextColor = .textPrimary + emptyConvoLabel.textAlignment = .center + + let instructionLabel = UILabel() + instructionLabel.font = .systemFont(ofSize: Values.verySmallFontSize) + instructionLabel.text = "home_empty_state_instruction".localized() + instructionLabel.themeTextColor = .textPrimary + instructionLabel.textAlignment = .center + instructionLabel.lineBreakMode = .byWordWrapping + instructionLabel.numberOfLines = 0 + + let result = UIStackView(arrangedSubviews: [ + image, + accountCreatedLabel, + welcomeLabel, + UIView.vSpacer(Values.smallSpacing), + UIView.line(), + UIView.vSpacer(Values.smallSpacing), + emptyConvoLabel, + UIView.vSpacer(Values.smallSpacing), + instructionLabel + ]) + result.axis = .vertical + result.spacing = Values.verySmallSpacing + result.alignment = .fill + result.isHidden = true + + return result + }() + // MARK: - Lifecycle override func viewDidLoad() { @@ -231,12 +260,6 @@ final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewData updateNavBarButtons(userProfile: self.viewModel.state.userProfile) setUpNavBarSessionHeading() - // Recovery phrase reminder - view.addSubview(seedReminderView) - seedReminderView.pin(.leading, to: .leading, of: view) - seedReminderView.pin(.top, to: .top, of: view) - seedReminderView.pin(.trailing, to: .trailing, of: view) - // Loading conversations label view.addSubview(loadingConversationsLabel) @@ -247,12 +270,7 @@ final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewData // Table view view.addSubview(tableView) tableView.pin(.leading, to: .leading, of: view) - if self.viewModel.state.showViewedSeedBanner { - tableViewTopConstraint = tableView.pin(.top, to: .bottom, of: seedReminderView) - } - else { - tableViewTopConstraint = tableView.pin(.top, to: .top, of: view) - } + tableViewTopConstraint = tableView.pin(.top, to: .top, of: view) tableView.pin(.trailing, to: .trailing, of: view) tableView.pin(.bottom, to: .bottom, of: view) @@ -262,6 +280,13 @@ final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewData let verticalCenteringConstraint = emptyStateView.center(.vertical, in: view) verticalCenteringConstraint.constant = -16 // Makes things appear centered visually + view.addSubview(accountCreatedView) + accountCreatedView.pin(.leading, to: .leading, of: view, withInset: 50) + accountCreatedView.pin(.trailing, to: .trailing, of: view, withInset: -50) + accountCreatedView.center(.horizontal, in: view) + let verticalCenteringConstraint2 = accountCreatedView.center(.vertical, in: view) + verticalCenteringConstraint2.constant = -Values.massiveSpacing // Makes things appear centered visually + // New conversation button view.addSubview(newConversationButton) newConversationButton.center(.horizontal, in: view) @@ -380,14 +405,7 @@ final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewData // Update the 'view seed' UI if updatedState.showViewedSeedBanner != self.viewModel.state.showViewedSeedBanner { tableViewTopConstraint.isActive = false - seedReminderView.isHidden = !updatedState.showViewedSeedBanner - - if updatedState.showViewedSeedBanner { - tableViewTopConstraint = tableView.pin(.top, to: .bottom, of: seedReminderView) - } - else { - tableViewTopConstraint = tableView.pin(.top, to: .top, of: view, withInset: Values.smallSpacing) - } + tableViewTopConstraint = tableView.pin(.top, to: .top, of: view, withInset: Values.smallSpacing) } self.viewModel.updateState(updatedState) @@ -406,10 +424,17 @@ final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewData self?.loadingConversationsLabel.isHidden = true // Show the empty state if there is no data - self?.emptyStateView.isHidden = ( - !updatedData.isEmpty && - updatedData.contains(where: { !$0.elements.isEmpty }) - ) + if self?.flow == .register { + self?.accountCreatedView.isHidden = ( + !updatedData.isEmpty && + updatedData.contains(where: { !$0.elements.isEmpty }) + ) + } else { + self?.emptyStateView.isHidden = ( + !updatedData.isEmpty && + updatedData.contains(where: { !$0.elements.isEmpty }) + ) + } self?.viewModel.updateThreadData(updatedData) self?.tableView.reloadData() @@ -422,10 +447,17 @@ final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewData loadingConversationsLabel.isHidden = true // Show the empty state if there is no data - emptyStateView.isHidden = ( - !updatedData.isEmpty && - updatedData.contains(where: { !$0.elements.isEmpty }) - ) + if self.flow == .register { + accountCreatedView.isHidden = ( + !updatedData.isEmpty && + updatedData.contains(where: { !$0.elements.isEmpty }) + ) + } else { + emptyStateView.isHidden = ( + !updatedData.isEmpty && + updatedData.contains(where: { !$0.elements.isEmpty }) + ) + } CATransaction.begin() CATransaction.setCompletionBlock { [weak self] in @@ -743,25 +775,6 @@ final class HomeVC: BaseVC, SessionUtilRespondingViewController, UITableViewData // MARK: - Interaction - func handleContinueButtonTapped(from seedReminderView: SeedReminderView) { - let targetViewController: UIViewController = { - if let seedVC: SeedVC = try? SeedVC() { - return StyledNavigationController(rootViewController: seedVC) - } - - return ConfirmationModal( - info: ConfirmationModal.Info( - title: "ALERT_ERROR_TITLE".localized(), - body: .text("LOAD_RECOVERY_PASSWORD_ERROR".localized()), - cancelTitle: "BUTTON_OK".localized(), - cancelStyle: .alert_text - ) - ) - }() - - present(targetViewController, animated: true, completion: nil) - } - func show( _ threadId: String, variant: SessionThread.Variant, diff --git a/Session/Meta/Images.xcassets/Session/Hooray.imageset/Contents.json b/Session/Meta/Images.xcassets/Session/Hooray.imageset/Contents.json new file mode 100644 index 000000000..fccd6a013 --- /dev/null +++ b/Session/Meta/Images.xcassets/Session/Hooray.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "account_created_mobile.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Session/Meta/Images.xcassets/Session/Hooray.imageset/account_created_mobile.pdf b/Session/Meta/Images.xcassets/Session/Hooray.imageset/account_created_mobile.pdf new file mode 100644 index 000000000..fc728a97f --- /dev/null +++ b/Session/Meta/Images.xcassets/Session/Hooray.imageset/account_created_mobile.pdf @@ -0,0 +1,395 @@ +%PDF-1.7 + +1 0 obj + << /Length 2 0 R + /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ] + /Domain [ 0.000000 1.000000 ] + /FunctionType 4 + >> +stream +{ 0.560784 exch 0.278431 exch 0.000000 exch dup 0.023500 gt { exch pop exch pop exch pop dup 0.023500 sub -0.124494 mul 0.560784 add exch dup 0.023500 sub -0.036144 mul 0.278431 add exch dup 0.023500 sub 0.180717 mul 0.000000 add exch } if dup 1.000000 gt { exch pop exch pop exch pop 0.439216 exch 0.243137 exch 0.176471 exch } if pop } +endstream +endobj + +2 0 obj + 338 +endobj + +3 0 obj + << /Pattern << /P1 << /Matrix [ -22.325476 -13.395300 13.395300 -22.325476 31.342981 90.363075 ] + /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ] + /ColorSpace /DeviceRGB + /Function 1 0 R + /Domain [ 0.000000 1.000000 ] + /ShadingType 2 + /Extend [ true true ] + >> + /PatternType 2 + /Type /Pattern + >> >> + /ExtGState << /E1 << /ca 0.440000 >> >> + >> +endobj + +4 0 obj + << /Length 5 0 R >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +1.000000 0.000000 -0.000000 1.000000 5.099609 -1.783203 cm +1.000000 0.756863 0.027451 scn +0.486482 5.330601 m +2.188982 3.485600 9.201483 6.703098 14.736483 9.283096 c +18.883984 11.210598 35.481483 18.020596 43.731483 21.553097 c +45.958984 22.505596 49.198982 23.750595 51.531479 26.818092 c +53.601482 29.548094 59.091476 41.143097 48.036476 52.888096 c +36.816479 64.813095 25.258984 61.520596 20.938984 58.460598 c +18.396482 56.660595 16.326483 52.603096 15.396482 50.540596 c +11.466482 41.825596 5.863982 25.858097 3.583982 19.580597 c +1.911482 14.953098 -1.201018 7.160603 0.486482 5.330601 c +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 17.023438 15.060059 cm +1.000000 0.560784 0.000000 scn +2.362500 31.072266 m +2.467500 29.767265 2.730000 27.644762 3.630000 23.557262 c +4.245000 20.752262 5.250000 17.812263 6.067500 15.869763 c +8.520000 10.027264 11.962499 7.672266 15.449999 5.782267 c +21.374998 2.572268 25.402500 1.972265 25.402500 1.972265 c +20.572500 -0.000233 l +20.572500 -0.000233 17.647499 0.607267 13.657499 2.572268 c +9.855000 4.447268 5.895000 7.619764 3.000000 13.829763 c +1.747500 16.522263 1.019999 19.132263 0.599999 21.202263 c +0.082499 23.767263 0.000000 25.222263 0.000000 25.222263 c +2.362500 31.072266 l +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 11.757812 9.750000 cm +1.000000 0.560784 0.000000 scn +1.695000 21.172363 m +1.695000 21.172363 2.295000 16.304863 6.315000 10.162363 c +11.025001 2.977364 17.602501 1.799862 17.602501 1.799862 c +13.230000 -0.000139 l +13.230000 -0.000139 8.347501 1.492363 3.705000 7.829863 c +0.810000 11.782363 0.000000 16.507362 0.000000 16.507362 c +1.695000 21.172363 l +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 7.888672 5.737793 cm +1.000000 0.560784 0.000000 scn +1.402500 13.649902 m +1.402500 13.649902 2.497499 9.449903 4.897499 6.314903 c +7.754999 2.572403 11.392499 1.484901 11.392499 1.484901 c +8.039999 -0.000095 l +8.039999 -0.000095 5.497500 0.532402 2.715000 4.057402 c +0.600000 6.734901 0.000000 9.809906 0.000000 9.809906 c +1.402500 13.649902 l +h +f +n +Q +q +/E1 gs +1.000000 0.000000 -0.000000 1.000000 7.357422 7.732910 cm +1.000000 0.992157 0.905882 scn +0.111580 0.989784 m +-0.038420 1.327286 -0.038420 1.709785 0.119080 2.039787 c +19.221579 41.654785 l +22.364080 29.842285 l +2.264080 0.809784 l +1.724079 -0.000214 0.509080 0.104786 0.111580 0.989784 c +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 25.925781 20.037598 cm +/Pattern cs +/P1 scn +5.310895 13.570057 m +14.235895 3.130058 24.398394 4.435062 27.780893 7.075062 c +31.170893 9.722561 33.848392 18.820061 24.960892 29.087559 c +15.645891 39.842560 5.100893 36.775063 2.663393 34.450062 c +0.225893 32.125061 -2.879105 23.147558 5.310895 13.570057 c +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 40.453125 21.547852 cm +0.011765 0.662745 0.956863 scn +21.434999 7.762325 m +18.180000 10.492325 16.447500 10.004822 14.122499 9.037323 c +11.122499 7.792322 6.405001 6.869822 0.000000 9.037323 c +1.927500 13.679825 l +5.730000 12.397324 8.482500 13.019823 10.860001 14.422321 c +13.920001 16.222322 18.105003 18.689823 24.615005 13.222324 c +27.330006 10.942324 30.112501 9.427324 32.152500 10.117325 c +33.637501 10.612324 34.425007 12.824823 34.822506 14.587323 c +34.860004 14.744823 34.920002 15.194820 34.965000 15.592320 c +35.325001 18.344820 35.925003 24.284822 40.350002 27.322323 c +45.082504 30.569822 50.055008 30.569824 50.055008 30.569824 c +50.955006 21.629822 l +48.667507 21.967323 47.077503 21.502327 45.735004 20.759827 c +40.680004 17.947327 45.082504 7.147322 37.215004 3.517323 c +29.647501 -0.000179 23.460001 6.067324 21.434999 7.762325 c +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 28.998047 40.709961 cm +0.956863 0.262745 0.211765 scn +5.049951 0.000038 m +1.794951 2.917538 l +7.772450 9.592537 6.197451 14.497540 5.049951 18.067539 c +4.817451 18.787537 4.599950 19.470039 4.457450 20.122540 c +3.947450 22.432539 3.842450 24.442539 3.999950 26.197538 c +1.704950 29.055038 0.692450 32.047539 0.624950 32.250038 c +-0.770050 36.472542 0.279950 40.590038 2.687450 44.452538 c +7.554950 52.290039 16.367451 52.290039 16.367451 52.290039 c +19.307453 44.422539 l +17.072453 44.512539 9.744949 44.400040 7.494949 40.852539 c +4.652450 36.382538 6.519950 33.622540 6.654950 33.307541 c +7.202450 34.020039 7.757448 34.590038 8.252448 35.032539 c +11.844948 38.220039 14.964951 38.677540 16.952450 38.497540 c +19.187450 38.295040 21.212448 37.170036 22.659948 35.325039 c +24.242449 33.300041 24.894953 30.667540 24.392452 28.275040 c +23.904953 25.942539 22.352451 23.970039 20.019951 22.717539 c +15.947451 20.527538 12.557450 20.827539 10.284950 21.585041 c +10.299951 21.532539 10.307450 21.472540 10.322450 21.420040 c +10.404950 21.045040 10.569950 20.520041 10.764950 19.912540 c +12.092450 15.802540 14.559951 9.277538 5.049951 0.000038 c +h +10.562449 28.147541 m +10.997450 27.832541 11.454949 27.570040 11.927449 27.382540 c +13.502449 26.752541 15.219952 26.962540 17.169952 28.012539 c +18.317451 28.627541 18.452452 29.287539 18.497452 29.505039 c +18.632452 30.157537 18.407452 30.990040 17.919952 31.612539 c +17.492451 32.160042 16.997452 32.445038 16.404951 32.505039 c +15.279951 32.602539 13.757450 31.890039 12.234950 30.532539 c +11.507450 29.880041 10.952450 29.077539 10.562449 28.147541 c +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 42.417969 39.487305 cm +0.956863 0.560784 0.694118 scn +4.657499 0.000175 m +0.000000 0.127678 l +0.000000 0.127678 2.212497 12.622677 9.374997 14.722675 c +10.717497 15.112675 12.187498 15.510174 13.664998 15.727676 c +14.542498 15.862675 15.929998 16.065178 16.612499 16.320175 c +16.769999 17.497677 16.274996 18.997677 15.719996 20.700176 c +15.284996 22.020176 14.834996 23.377676 14.594996 24.862675 c +14.129996 27.757675 14.902497 30.315174 16.769997 32.077675 c +19.049997 34.215176 22.732502 34.897675 26.887501 33.952675 c +29.257502 33.412674 31.004997 32.250175 32.542496 31.230177 c +34.739998 29.767677 36.022499 29.025175 38.707497 30.832676 c +41.954998 33.022675 37.709999 41.595177 35.452499 46.545174 c +43.874996 50.055176 l +45.007496 47.580177 50.475002 34.845177 46.867500 27.577675 c +45.652500 25.132675 43.560001 23.512674 40.815002 22.905174 c +34.845001 21.570175 31.349998 23.895176 28.799999 25.590176 c +27.592499 26.392677 26.535002 27.022675 25.387501 27.352676 c +17.415001 29.625175 28.544998 17.895176 23.332497 12.622677 c +20.204998 9.465176 12.562500 8.632675 12.067500 8.512676 c +7.147500 7.327675 4.657499 0.000175 4.657499 0.000175 c +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 32.882812 60.615234 cm +0.788235 0.168627 0.152941 scn +0.108831 6.292480 m +-0.033669 4.642480 -0.101171 3.659981 0.326329 1.514981 c +2.388829 -0.000019 6.881330 -0.000019 6.881330 -0.000019 c +6.686329 0.607481 6.513829 1.132483 6.438829 1.507483 c +6.423830 1.559982 6.416330 1.619981 6.401330 1.672481 c +1.833830 3.952481 0.108831 6.292480 0.108831 6.292480 c +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 15.892578 59.520020 cm +1.000000 0.756863 0.027451 scn +7.755000 -0.000175 m +0.000000 3.802325 l +3.862499 9.382324 l +9.945000 5.354825 l +7.755000 -0.000175 l +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 3.779297 70.050293 cm +0.984314 0.549020 0.000000 scn +8.437500 -0.000215 m +4.477500 0.532286 0.442500 3.892285 0.000000 4.274785 c +3.892499 8.842285 l +5.069999 7.844785 7.567500 6.172285 9.240000 5.947285 c +8.437500 -0.000215 l +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 13.505859 80.047363 cm +0.011765 0.662745 0.956863 scn +5.700000 -0.000078 m +0.000000 1.867421 l +0.652500 3.862422 0.825000 6.014922 0.487500 8.092422 c +6.412499 9.044922 l +6.900000 6.029922 6.652500 2.902421 5.700000 -0.000078 c +h +f +n +Q +q +0.976900 0.213700 -0.213700 0.976900 56.732056 75.695648 cm +0.984314 0.549020 0.000000 scn +6.000000 9.019043 m +0.000000 9.019043 l +0.000000 1.099043 l +6.000000 1.099043 l +6.000000 9.019043 l +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 65.218750 82.672852 cm +1.000000 0.756863 0.027451 scn +4.125000 -0.000196 m +0.000000 4.357305 l +2.160000 6.404805 2.655001 9.082305 2.655001 9.112305 c +8.580002 8.144805 l +8.505002 7.672305 7.747500 3.427304 4.125000 -0.000196 c +h +f +n +Q +q +0.954500 0.298300 -0.298300 0.954500 73.833626 52.534313 cm +0.984314 0.549020 0.000000 scn +5.490000 7.364746 m +0.000000 7.364746 l +0.000000 1.364746 l +5.490000 1.364746 l +5.490000 7.364746 l +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 65.437500 11.227539 cm +0.956863 0.262745 0.211765 scn +7.725002 -0.000076 m +1.762499 0.704926 l +2.017499 2.827425 0.435000 5.429925 0.000000 6.007425 c +4.800001 9.607422 l +5.160001 9.134922 8.287502 4.807424 7.725002 -0.000076 c +h +f +n +Q +q +1.000000 0.000000 -0.000000 1.000000 83.271484 18.767578 cm +0.984314 0.549020 0.000000 scn +7.005003 0.064719 m +4.762503 0.402219 2.467503 0.537217 0.202503 0.454717 c +0.000000 6.454717 l +2.632500 6.544717 5.295000 6.394717 7.897500 5.997217 c +7.005003 0.064719 l +h +f +n +Q +q +0.702600 0.711600 -0.711600 0.702600 89.323250 3.549446 cm +0.956863 0.560784 0.694118 scn +6.000000 9.997559 m +0.000000 9.997559 l +0.000000 1.845057 l +6.000000 1.845057 l +6.000000 9.997559 l +h +f +n +Q +q +0.658300 -0.752700 0.752700 0.658300 62.830505 42.384869 cm +0.956863 0.262745 0.211765 scn +6.585000 9.291504 m +0.000000 9.291504 l +0.000000 2.706504 l +6.585000 2.706504 l +6.585000 9.291504 l +h +f +n +Q + +endstream +endobj + +5 0 obj + 9246 +endobj + +6 0 obj + << /Annots [] + /Type /Page + /MediaBox [ 0.000000 0.000000 96.000000 96.000000 ] + /Resources 3 0 R + /Contents 4 0 R + /Parent 7 0 R + >> +endobj + +7 0 obj + << /Kids [ 6 0 R ] + /Count 1 + /Type /Pages + >> +endobj + +8 0 obj + << /Pages 7 0 R + /Type /Catalog + >> +endobj + +xref +0 9 +0000000000 65535 f +0000000010 00000 n +0000000532 00000 n +0000000554 00000 n +0000001230 00000 n +0000010532 00000 n +0000010555 00000 n +0000010728 00000 n +0000010802 00000 n +trailer +<< /ID [ (some) (id) ] + /Root 8 0 R + /Size 9 +>> +startxref +10861 +%%EOF \ No newline at end of file diff --git a/Session/Meta/Translations/de.lproj/Localizable.strings b/Session/Meta/Translations/de.lproj/Localizable.strings index 8ca10d207..b56cd21a8 100644 --- a/Session/Meta/Translations/de.lproj/Localizable.strings +++ b/Session/Meta/Translations/de.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/en.lproj/Localizable.strings b/Session/Meta/Translations/en.lproj/Localizable.strings index 69fdff663..4656127b0 100644 --- a/Session/Meta/Translations/en.lproj/Localizable.strings +++ b/Session/Meta/Translations/en.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your\nrecovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/es.lproj/Localizable.strings b/Session/Meta/Translations/es.lproj/Localizable.strings index 96a52968e..1c8f2444d 100644 --- a/Session/Meta/Translations/es.lproj/Localizable.strings +++ b/Session/Meta/Translations/es.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/fa.lproj/Localizable.strings b/Session/Meta/Translations/fa.lproj/Localizable.strings index 56d45c0b9..4924174ab 100644 --- a/Session/Meta/Translations/fa.lproj/Localizable.strings +++ b/Session/Meta/Translations/fa.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/fi.lproj/Localizable.strings b/Session/Meta/Translations/fi.lproj/Localizable.strings index 25d5ffdaa..116a2e900 100644 --- a/Session/Meta/Translations/fi.lproj/Localizable.strings +++ b/Session/Meta/Translations/fi.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/fr.lproj/Localizable.strings b/Session/Meta/Translations/fr.lproj/Localizable.strings index ca0f7a26e..7981061bd 100644 --- a/Session/Meta/Translations/fr.lproj/Localizable.strings +++ b/Session/Meta/Translations/fr.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/hi.lproj/Localizable.strings b/Session/Meta/Translations/hi.lproj/Localizable.strings index 50b470b32..3f2454af0 100644 --- a/Session/Meta/Translations/hi.lproj/Localizable.strings +++ b/Session/Meta/Translations/hi.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/hr.lproj/Localizable.strings b/Session/Meta/Translations/hr.lproj/Localizable.strings index da31a3f7c..6b66d782e 100644 --- a/Session/Meta/Translations/hr.lproj/Localizable.strings +++ b/Session/Meta/Translations/hr.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/id-ID.lproj/Localizable.strings b/Session/Meta/Translations/id-ID.lproj/Localizable.strings index afa73ff59..18d0b9347 100644 --- a/Session/Meta/Translations/id-ID.lproj/Localizable.strings +++ b/Session/Meta/Translations/id-ID.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/it.lproj/Localizable.strings b/Session/Meta/Translations/it.lproj/Localizable.strings index 2ce4c618e..14665e59b 100644 --- a/Session/Meta/Translations/it.lproj/Localizable.strings +++ b/Session/Meta/Translations/it.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/ja.lproj/Localizable.strings b/Session/Meta/Translations/ja.lproj/Localizable.strings index c7d3b0a57..87ef43d09 100644 --- a/Session/Meta/Translations/ja.lproj/Localizable.strings +++ b/Session/Meta/Translations/ja.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/nl.lproj/Localizable.strings b/Session/Meta/Translations/nl.lproj/Localizable.strings index c4958ad96..e29084999 100644 --- a/Session/Meta/Translations/nl.lproj/Localizable.strings +++ b/Session/Meta/Translations/nl.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/pl.lproj/Localizable.strings b/Session/Meta/Translations/pl.lproj/Localizable.strings index 3193ec681..46dd4945d 100644 --- a/Session/Meta/Translations/pl.lproj/Localizable.strings +++ b/Session/Meta/Translations/pl.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/pt_BR.lproj/Localizable.strings b/Session/Meta/Translations/pt_BR.lproj/Localizable.strings index f06344e96..708bc1628 100644 --- a/Session/Meta/Translations/pt_BR.lproj/Localizable.strings +++ b/Session/Meta/Translations/pt_BR.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/ru.lproj/Localizable.strings b/Session/Meta/Translations/ru.lproj/Localizable.strings index 8e017a442..6faa8183f 100644 --- a/Session/Meta/Translations/ru.lproj/Localizable.strings +++ b/Session/Meta/Translations/ru.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/si.lproj/Localizable.strings b/Session/Meta/Translations/si.lproj/Localizable.strings index 48818d8a6..77a829793 100644 --- a/Session/Meta/Translations/si.lproj/Localizable.strings +++ b/Session/Meta/Translations/si.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/sk.lproj/Localizable.strings b/Session/Meta/Translations/sk.lproj/Localizable.strings index dcc1e4d6d..154283982 100644 --- a/Session/Meta/Translations/sk.lproj/Localizable.strings +++ b/Session/Meta/Translations/sk.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/sv.lproj/Localizable.strings b/Session/Meta/Translations/sv.lproj/Localizable.strings index 6b897f265..db6fe082d 100644 --- a/Session/Meta/Translations/sv.lproj/Localizable.strings +++ b/Session/Meta/Translations/sv.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/th.lproj/Localizable.strings b/Session/Meta/Translations/th.lproj/Localizable.strings index d1ec245e0..ab420529f 100644 --- a/Session/Meta/Translations/th.lproj/Localizable.strings +++ b/Session/Meta/Translations/th.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/vi-VN.lproj/Localizable.strings b/Session/Meta/Translations/vi-VN.lproj/Localizable.strings index aa715446a..8608e5063 100644 --- a/Session/Meta/Translations/vi-VN.lproj/Localizable.strings +++ b/Session/Meta/Translations/vi-VN.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings b/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings index a2fd361ff..9a51ccf70 100644 --- a/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings +++ b/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Meta/Translations/zh_CN.lproj/Localizable.strings b/Session/Meta/Translations/zh_CN.lproj/Localizable.strings index 9f3d93a76..b0e90762c 100644 --- a/Session/Meta/Translations/zh_CN.lproj/Localizable.strings +++ b/Session/Meta/Translations/zh_CN.lproj/Localizable.strings @@ -669,3 +669,7 @@ "onboarding_recovery_password_title" = "Save your recovery password"; "onboarding_recovery_password_explanation" = "Use your password to load your account on new devices. Make sure it is stored in a safe place — and don't share it with anyone."; "tap_to_copy" = "Tap to copy"; +"home_empty_state_account_created" = "Account Created"; +"home_empty_state_welcome" = "Welcome to Session"; +"home_empty_state_no_conversation" = "You don't have any conversations yet"; +"home_empty_state_instruction" = "Hit the plus button to start a chat, create a group, or join an official communitiy!"; diff --git a/Session/Onboarding/PNModeView.swift b/Session/Onboarding/PNModeView.swift index 2abb8b32d..54ea4550e 100644 --- a/Session/Onboarding/PNModeView.swift +++ b/Session/Onboarding/PNModeView.swift @@ -114,7 +114,7 @@ struct PNModeView: View { self.flow.completeRegistration() // Go to recovery password screen - if let recoveryPasswordView = try? RecoveryPasswordView() { + if let recoveryPasswordView = try? RecoveryPasswordView(flow: self.flow) { let viewController: SessionHostingViewController = SessionHostingViewController(rootView: recoveryPasswordView) viewController.setUpNavBarSessionIcon() self.host.controller?.navigationController?.pushViewController(viewController, animated: true) diff --git a/Session/Onboarding/RecoveryPasswordView.swift b/Session/Onboarding/RecoveryPasswordView.swift index bf3df4024..17efcbba8 100644 --- a/Session/Onboarding/RecoveryPasswordView.swift +++ b/Session/Onboarding/RecoveryPasswordView.swift @@ -10,15 +10,18 @@ struct RecoveryPasswordView: View { @State private var copied: Bool = false private let mnemonic: String + private let flow: Onboarding.Flow static let cornerRadius: CGFloat = 13 - public init() throws { + public init(flow: Onboarding.Flow) throws { self.mnemonic = try Identity.mnemonic() + self.flow = flow } - public init(hardcode: String) { + public init(hardcode: String, flow: Onboarding.Flow) { self.mnemonic = hardcode + self.flow = flow } var body: some View { @@ -124,7 +127,7 @@ struct RecoveryPasswordView: View { } private func finishRegister() { - let homeVC: HomeVC = HomeVC() + let homeVC: HomeVC = HomeVC(flow: self.flow) self.host.controller?.navigationController?.setViewControllers([ homeVC ], animated: true) return } @@ -132,6 +135,6 @@ struct RecoveryPasswordView: View { struct RecoveryPasswordView_Previews: PreviewProvider { static var previews: some View { - RecoveryPasswordView(hardcode: "Voyage urban toyed maverick peculiar tuxedo penguin tree grass building listen speak") + RecoveryPasswordView(hardcode: "Voyage urban toyed maverick peculiar tuxedo penguin tree grass building listen speak", flow: .register) } } diff --git a/SessionUIKit/Utilities/UIView+Utilities.swift b/SessionUIKit/Utilities/UIView+Utilities.swift index 5e3e5af30..b5518ad1f 100644 --- a/SessionUIKit/Utilities/UIView+Utilities.swift +++ b/SessionUIKit/Utilities/UIView+Utilities.swift @@ -72,4 +72,12 @@ public extension UIView { return result } + + static func line() -> UIView { + let result: UIView = UIView() + result.set(.height, to: 1) + result.themeBackgroundColor = .borderSeparator + + return result + } }