Fix fake chat view glitch
This commit is contained in:
parent
99ce25ff6b
commit
9493074926
|
@ -2,6 +2,11 @@
|
|||
final class FakeChatView : UIView {
|
||||
private let spacing = Values.mediumSpacing
|
||||
|
||||
var contentOffset: CGPoint {
|
||||
get { return scrollView.contentOffset }
|
||||
set { scrollView.contentOffset = newValue }
|
||||
}
|
||||
|
||||
private lazy var chatBubbles = [
|
||||
getChatBubble(withText: NSLocalizedString("What is Loki Messenger? A completely decentralised private messaging application for all platforms.", comment: ""), wasSentByCurrentUser: true),
|
||||
getChatBubble(withText: NSLocalizedString("So no metadata collection, or personally identifiable information? How does it work?", comment: ""), wasSentByCurrentUser: false),
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
final class LandingVC : UIViewController {
|
||||
private var fakeChatViewContentOffset: CGPoint!
|
||||
|
||||
// MARK: Components
|
||||
private lazy var fakeChatView: FakeChatView = {
|
||||
|
@ -77,8 +78,17 @@ final class LandingVC : UIViewController {
|
|||
topSpacer.heightAnchor.constraint(equalTo: bottomSpacer.heightAnchor, multiplier: 1).isActive = true
|
||||
}
|
||||
|
||||
override func viewDidDisappear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
fakeChatView.contentOffset = fakeChatViewContentOffset
|
||||
}
|
||||
|
||||
// MARK: Interaction
|
||||
@objc private func register() {
|
||||
fakeChatViewContentOffset = fakeChatView.contentOffset
|
||||
DispatchQueue.main.async {
|
||||
self.fakeChatView.contentOffset = self.fakeChatViewContentOffset
|
||||
}
|
||||
let publicKeyVC = PublicKeyVC()
|
||||
navigationController!.pushViewController(publicKeyVC, animated: true)
|
||||
}
|
||||
|
|
|
@ -122,9 +122,9 @@ public class OnboardingController: NSObject {
|
|||
}
|
||||
|
||||
public func pushDisplayNameVC(from viewController: UIViewController) {
|
||||
AssertIsOnMainThread()
|
||||
let displayNameVC = DisplayNameVC(onboardingController: self)
|
||||
viewController.navigationController?.pushViewController(displayNameVC, animated: true)
|
||||
// AssertIsOnMainThread()
|
||||
// let displayNameVC = DisplayNameVC(onboardingController: self)
|
||||
// viewController.navigationController?.pushViewController(displayNameVC, animated: true)
|
||||
}
|
||||
|
||||
public func onboardingRegistrationSucceeded(viewController: UIViewController) {
|
||||
|
|
Loading…
Reference in New Issue