Skip to content
Snippets Groups Projects
Commit 5a00a1b6 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

misc: cleanup

Change-Id: Ia9f7ed6fc957e70255aeffb38683508560bec442
parent 1a511e7a
No related branches found
No related tags found
No related merge requests found
...@@ -117,7 +117,7 @@ class CreateAccountViewController: UIViewController, StoryboardBased, ViewModelB ...@@ -117,7 +117,7 @@ class CreateAccountViewController: UIViewController, StoryboardBased, ViewModelB
} }
func adaptToSystemColor() { func adaptToSystemColor() {
view.backgroundColor = UIColor.jamiBackgroundColor view.backgroundColor = .clear
} }
func setContentInset(keyboardHeight: CGFloat = 0) { func setContentInset(keyboardHeight: CGFloat = 0) {
......
...@@ -98,7 +98,6 @@ class WalkthroughCoordinator: Coordinator, StateableResponsive { ...@@ -98,7 +98,6 @@ class WalkthroughCoordinator: Coordinator, StateableResponsive {
switch walkthroughType { switch walkthroughType {
case .createAccount: case .createAccount:
let createAccountViewController = CreateAccountViewController.instantiate(with: self.injectionBag) let createAccountViewController = CreateAccountViewController.instantiate(with: self.injectionBag)
createAccountViewController.view.backgroundColor = .clear
self.present(viewController: createAccountViewController, withStyle: .formModal, withAnimation: true, withStateable: createAccountViewController.viewModel) self.present(viewController: createAccountViewController, withStyle: .formModal, withAnimation: true, withStateable: createAccountViewController.viewModel)
case .createSipAccount: case .createSipAccount:
let sipAccountViewController = CreateSipAccountViewController.instantiate(with: self.injectionBag) let sipAccountViewController = CreateSipAccountViewController.instantiate(with: self.injectionBag)
......
...@@ -130,32 +130,7 @@ class WelcomeViewController: UIViewController, StoryboardBased, ViewModelBased { ...@@ -130,32 +130,7 @@ class WelcomeViewController: UIViewController, StoryboardBased, ViewModelBased {
} }
private func aboutJamiButtonDidTap() { private func aboutJamiButtonDidTap() {
var compileDate: String { AppInfoHelper.showAboutJamiAlert(onViewController: self)
let dateDefault = ""
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "YYYYMMdd"
let bundleName = Bundle.main.infoDictionary!["CFBundleName"] as? String ?? "Info.plist"
if let infoPath = Bundle.main.path(forResource: bundleName, ofType: nil),
let infoAttr = try? FileManager.default.attributesOfItem(atPath: infoPath),
let infoDate = infoAttr[FileAttributeKey.creationDate] as? Date {
return dateFormatter.string(from: infoDate)
}
return dateDefault
}
let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? ""
let versionName = "Világfa"
let alert = UIAlertController(title: "\nJami\nversion: \(appVersion)(\(compileDate))\n\(versionName)", message: "", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: L10n.Global.ok, style: .default, handler: nil))
let image = UIImageView(image: UIImage(asset: Asset.jamiIcon))
alert.view.addSubview(image)
image.translatesAutoresizingMaskIntoConstraints = false
alert.view.addConstraint(NSLayoutConstraint(item: image, attribute: .centerX, relatedBy: .equal, toItem: alert.view, attribute: .centerX, multiplier: 1, constant: 0))
alert.view.addConstraint(NSLayoutConstraint(item: image, attribute: .centerY, relatedBy: .equal, toItem: alert.view, attribute: .top, multiplier: 1, constant: 0.0))
alert.view.addConstraint(NSLayoutConstraint(item: image, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: 64.0))
alert.view.addConstraint(NSLayoutConstraint(item: image, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: 64.0))
self.present(alert, animated: true, completion: nil)
} }
func setupButtonActions() { func setupButtonActions() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment