GitToTheHub commented on code in PR #1701:
URL: https://github.com/apache/cordova-ios/pull/1701#discussion_r3864780709
##########
CordovaLib/Classes/Public/CDVViewController.m:
##########
@@ -598,7 +599,11 @@ -
(void)scrollViewDidChangeAdjustedContentInset:(UIScrollView *)scrollView
// On Mac Catalyst, Cordova may manually constrain the web view below the
title bar.
// In that case automatic scroll-view inset adjustment is disabled, so the
synthetic
// status bar view should be hidden.
- self.statusBarBackground.hidden =
(scrollView.contentInsetAdjustmentBehavior ==
UIScrollViewContentInsetAdjustmentNever);
+ if (_statusBarHidden) {
+ self.statusBarBackground.hidden = true;
Review Comment:
Rather than updating `self.statusBarBackground.hidden` to `true` when
`_statusBarHidden` changes, I would sync it directly in `showStatusBar:`. It's
more clean if it's just:
```objc
if (!_statusBarHidden) {
self.statusBarBackground.hidden =
(scrollView.contentInsetAdjustmentBehavior ==
UIScrollViewContentInsetAdjustmentNever);
}
```
with the comment above. The comment above also is only relevant for this
piece of code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]