Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix #1983: Always add constraints when showing reader mode bar. #1991

Merged
merged 1 commit into from
Nov 20, 2019
Merged
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
11 changes: 6 additions & 5 deletions Client/Frontend/Browser/BrowserViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -616,11 +616,6 @@ class BrowserViewController: UIViewController {
make.height.equalTo(BrowserViewControllerUX.ShowHeaderTapAreaHeight)
}

readerModeBar?.snp.makeConstraints { make in
make.top.equalTo(self.header.snp.bottom)
make.height.equalTo(UIConstants.ToolbarHeight)
make.leading.trailing.equalTo(self.view)
}
}

override func viewDidLayoutSubviews() {
Expand Down Expand Up @@ -2687,6 +2682,12 @@ extension BrowserViewController {
readerModeBar.delegate = self
view.insertSubview(readerModeBar, belowSubview: header)
self.readerModeBar = readerModeBar

readerModeBar.snp.makeConstraints { make in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: It's not actually in viewDidLayoutSubviews Github is showing it weird..

make.top.equalTo(self.header.snp.bottom)
make.height.equalTo(UIConstants.ToolbarHeight)
make.leading.trailing.equalTo(self.view)
}
}

updateReaderModeBar()
Expand Down