Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ class GetStartedBannerViewController: UIViewController, UICollectionViewDelegate
header.autoPinEdge(toSuperviewMargin: .trailing, relation: .lessThanOrEqual)
header.autoPinEdge(.top, to: .top, of: opaqueBackdrop, withOffset: 8)

collectionView.preservesSuperviewLayoutMargins = true
collectionView.autoSetDimension(.height, toSize: 180)
collectionView.autoPinEdge(.top, to: .bottom, of: header, withOffset: 12)
collectionView.autoPinWidthToSuperview()
collectionView.autoPinBottomToSuperviewMargin()
collectionView.layoutMargins = UIEdgeInsets(top: 0, leading: 16, bottom: 0, trailing: 16)
collectionView.clipsToBounds = false

self.view = view
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,16 @@ public class ChatListViewController: OWSViewController, HomeTabViewController {
emptyInboxView.autoAlignAxis(.horizontal, toSameAxisOf: view, withMultiplier: 0.85)

// First Conversation Cue
view.addSubview(firstConversationCueView)
firstConversationCueView.autoPin(toTopLayoutGuideOf: self, withInset: 0)
// This inset bakes in assumptions about UINavigationBar layout, but I'm not sure
// there's a better way to do it, since it isn't safe to use iOS auto layout with
// UINavigationBar contents.
firstConversationCueView.autoPinEdge(toSuperviewEdge: .trailing, withInset: 6)
firstConversationCueView.autoPinEdge(toSuperviewEdge: .leading, withInset: 10, relation: .greaterThanOrEqual)
firstConversationCueView.autoPinEdge(toSuperviewMargin: .bottom, relation: .greaterThanOrEqual)
if let navigationController = self.navigationController {
navigationController.view.addSubview(firstConversationCueView)

// This inset bakes in assumptions about UINavigationBar layout, but I'm not sure
// if there's a better way to do it, since it isn't safe to use iOS auto layout with
// UINavigationBar contents.
firstConversationCueView.autoPinEdge(toSuperviewMargin: .top, withInset: 35)
firstConversationCueView.autoPinEdge(toSuperviewEdge: .trailing, withInset: 6)
firstConversationCueView.autoPinEdge(toSuperviewEdge: .leading, withInset: 10, relation: .greaterThanOrEqual)
}

// Search
navigationItem.searchController = viewState.searchController
Expand Down Expand Up @@ -240,6 +242,7 @@ public class ChatListViewController: OWSViewController, HomeTabViewController {
super.viewWillDisappear(animated)

isViewVisible = false
firstConversationCueView.isHidden = true
searchResultsController.viewWillDisappear(animated)
}

Expand Down