make things compile

pull/1023/head
Ryan ZHAO 2 years ago
parent bcc1d436bc
commit e790fa4519

@ -1,6 +1,45 @@
{
"sourceLanguage" : "en",
"strings" : {
"CFBundleDisplayName" : {
"comment" : "Bundle display name",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Session"
}
}
}
},
"CFBundleGetInfoString" : {
"comment" : "Get Info string",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : ""
}
}
}
},
"CFBundleName" : {
"comment" : "Bundle name",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Session"
}
}
}
},
"New Message" : {
},
"NSAppleMusicUsageDescription" : {
"extractionState" : "manual",
"localizations" : {
@ -34,6 +73,18 @@
}
}
},
"NSHumanReadableCopyright" : {
"comment" : "Copyright (human-readable)",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "com.loki-project.loki-messenger"
}
}
}
},
"NSMicrophoneUsageDescription" : {
"extractionState" : "manual",
"localizations" : {

@ -50,7 +50,7 @@ final class JoinOpenGroupVC: BaseVC, UIPageViewControllerDataSource, UIPageViewC
}()
private lazy var scanQRCodeWrapperVC: ScanQRCodeWrapperVC = {
let result: ScanQRCodeWrapperVC = ScanQRCodeWrapperVC(message: nil)
let result: ScanQRCodeWrapperVC = ScanQRCodeWrapperVC()
result.delegate = self
return result

@ -42,8 +42,7 @@ final class QRCodeVC : BaseVC, UIPageViewControllerDataSource, UIPageViewControl
}()
private lazy var scanQRCodeWrapperVC: ScanQRCodeWrapperVC = {
let message = "vc_qr_code_view_scan_qr_code_explanation".localized()
let result = ScanQRCodeWrapperVC(message: message)
let result = ScanQRCodeWrapperVC()
result.delegate = self
return result

@ -469,7 +469,8 @@ class SettingsViewModel: SessionTableViewModel, NavigationItemSource, Navigatabl
self?.transitionToScreen(targetViewController, transitionType: .present)
}
}
),
)
).appending(contentsOf: [
SessionCell.Info(
id: .help,
leftAccessory: .icon(
@ -495,7 +496,7 @@ class SettingsViewModel: SessionTableViewModel, NavigationItemSource, Navigatabl
self?.transitionToScreen(NukeDataModal(), transitionType: .present)
}
)
)
])
)
]
}

@ -7,17 +7,10 @@ final class ScanQRCodeWrapperVC: BaseVC {
var delegate: (UIViewController & QRScannerDelegate)? = nil
var isPresentedModally = false
private let message: String?
private let scanQRCodeVC = QRCodeScanningViewController()
// MARK: - Lifecycle
init(message: String?) {
self.message = message
super.init(nibName: nil, bundle: nil)
}
required init?(coder: NSCoder) {
preconditionFailure("Use init(message:) instead.")
}
@ -40,37 +33,7 @@ final class ScanQRCodeWrapperVC: BaseVC {
scanQRCodeVC.scanDelegate = delegate
let scanQRCodeVCView = scanQRCodeVC.view!
view.addSubview(scanQRCodeVCView)
scanQRCodeVCView.pin(.leading, to: .leading, of: view)
scanQRCodeVCView.pin(.trailing, to: .trailing, of: view)
scanQRCodeVCView.autoPinEdge(.top, to: .top, of: view)
if let message = message {
scanQRCodeVCView.set(.height, lessThanOrEqualTo: UIScreen.main.bounds.width)
// Set up bottom view
let bottomView = UIView()
view.addSubview(bottomView)
bottomView.pin(.top, to: .bottom, of: scanQRCodeVCView)
bottomView.pin(.leading, to: .leading, of: view)
bottomView.pin(.trailing, to: .trailing, of: view)
bottomView.pin(.bottom, to: .bottom, of: view)
// Set up explanation label
let explanationLabel: UILabel = UILabel()
explanationLabel.font = .systemFont(ofSize: Values.smallFontSize)
explanationLabel.text = message
explanationLabel.themeTextColor = .textPrimary
explanationLabel.textAlignment = .center
explanationLabel.lineBreakMode = .byWordWrapping
explanationLabel.numberOfLines = 0
bottomView.addSubview(explanationLabel)
explanationLabel.autoPinWidthToSuperview(withMargin: 32)
explanationLabel.autoPinHeightToSuperview(withMargin: 32)
}
else {
scanQRCodeVCView.autoPinEdge(.bottom, to: .bottom, of: view)
}
scanQRCodeVCView.pin(to: view)
}
override func viewDidAppear(_ animated: Bool) {

Loading…
Cancel
Save