mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Fix fake chat view glitch
This commit is contained in:
parent
99ce25ff6b
commit
9493074926
|
@ -2,6 +2,11 @@
|
||||||
final class FakeChatView : UIView {
|
final class FakeChatView : UIView {
|
||||||
private let spacing = Values.mediumSpacing
|
private let spacing = Values.mediumSpacing
|
||||||
|
|
||||||
|
var contentOffset: CGPoint {
|
||||||
|
get { return scrollView.contentOffset }
|
||||||
|
set { scrollView.contentOffset = newValue }
|
||||||
|
}
|
||||||
|
|
||||||
private lazy var chatBubbles = [
|
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("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),
|
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 {
|
final class LandingVC : UIViewController {
|
||||||
|
private var fakeChatViewContentOffset: CGPoint!
|
||||||
|
|
||||||
// MARK: Components
|
// MARK: Components
|
||||||
private lazy var fakeChatView: FakeChatView = {
|
private lazy var fakeChatView: FakeChatView = {
|
||||||
|
@ -77,8 +78,17 @@ final class LandingVC : UIViewController {
|
||||||
topSpacer.heightAnchor.constraint(equalTo: bottomSpacer.heightAnchor, multiplier: 1).isActive = true
|
topSpacer.heightAnchor.constraint(equalTo: bottomSpacer.heightAnchor, multiplier: 1).isActive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func viewDidDisappear(_ animated: Bool) {
|
||||||
|
super.viewDidAppear(animated)
|
||||||
|
fakeChatView.contentOffset = fakeChatViewContentOffset
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: Interaction
|
// MARK: Interaction
|
||||||
@objc private func register() {
|
@objc private func register() {
|
||||||
|
fakeChatViewContentOffset = fakeChatView.contentOffset
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
self.fakeChatView.contentOffset = self.fakeChatViewContentOffset
|
||||||
|
}
|
||||||
let publicKeyVC = PublicKeyVC()
|
let publicKeyVC = PublicKeyVC()
|
||||||
navigationController!.pushViewController(publicKeyVC, animated: true)
|
navigationController!.pushViewController(publicKeyVC, animated: true)
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,9 +122,9 @@ public class OnboardingController: NSObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
public func pushDisplayNameVC(from viewController: UIViewController) {
|
public func pushDisplayNameVC(from viewController: UIViewController) {
|
||||||
AssertIsOnMainThread()
|
// AssertIsOnMainThread()
|
||||||
let displayNameVC = DisplayNameVC(onboardingController: self)
|
// let displayNameVC = DisplayNameVC(onboardingController: self)
|
||||||
viewController.navigationController?.pushViewController(displayNameVC, animated: true)
|
// viewController.navigationController?.pushViewController(displayNameVC, animated: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func onboardingRegistrationSucceeded(viewController: UIViewController) {
|
public func onboardingRegistrationSucceeded(viewController: UIViewController) {
|
||||||
|
|
Loading…
Reference in a new issue