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

Commit

Permalink
Fix #1983: Always add constraints when showing reader mode bar. (#1991)
Browse files Browse the repository at this point in the history
  • Loading branch information
iccub authored Nov 20, 2019
1 parent fdb3f85 commit fb7f96b
Showing 1 changed file with 6 additions and 5 deletions.
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
make.top.equalTo(self.header.snp.bottom)
make.height.equalTo(UIConstants.ToolbarHeight)
make.leading.trailing.equalTo(self.view)
}
}

updateReaderModeBar()
Expand Down

0 comments on commit fb7f96b

Please sign in to comment.