mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
Fix tslint errors and add a couple of traces
This commit is contained in:
@ -208,30 +208,35 @@ export class TabView extends common.TabView {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private _actionBarHidden: boolean;
|
private _actionBarHiddenByTabView: boolean;
|
||||||
public _handleTwoNavigationBars(backToMoreWillBeVisible: boolean){
|
public _handleTwoNavigationBars(backToMoreWillBeVisible: boolean){
|
||||||
if (trace.enabled) {
|
if (trace.enabled) {
|
||||||
trace.write(`TabView._handleTwoNavigationBars(${backToMoreWillBeVisible})`, trace.categories.Debug);
|
trace.write(`TabView._handleTwoNavigationBars(backToMoreWillBeVisible: ${backToMoreWillBeVisible})`, trace.categories.Debug);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The "< Back" and "< More" navigation bars should not be visible simultaneously.
|
// The "< Back" and "< More" navigation bars should not be visible simultaneously.
|
||||||
let page = <Page>this.page;
|
let page = <Page>this.page;
|
||||||
let actionBarVisible = page.frame._getNavBarVisible(page);
|
let actionBarVisible = page.frame._getNavBarVisible(page);
|
||||||
let moreNavigationBar = this._ios.moreNavigationController.navigationBar;
|
|
||||||
|
|
||||||
if (backToMoreWillBeVisible && actionBarVisible){
|
if (backToMoreWillBeVisible && actionBarVisible){
|
||||||
page.frame.ios._disableNavBarAnimation = true;
|
page.frame.ios._disableNavBarAnimation = true;
|
||||||
page.actionBarHidden = true;
|
page.actionBarHidden = true;
|
||||||
page.frame.ios._disableNavBarAnimation = false;
|
page.frame.ios._disableNavBarAnimation = false;
|
||||||
this._actionBarHidden = true;
|
this._actionBarHiddenByTabView = true;
|
||||||
|
if (trace.enabled) {
|
||||||
|
trace.write(`TabView hid action bar`, trace.categories.Debug);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!backToMoreWillBeVisible && this._actionBarHidden){
|
if (!backToMoreWillBeVisible && this._actionBarHiddenByTabView){
|
||||||
page.frame.ios._disableNavBarAnimation = true;
|
page.frame.ios._disableNavBarAnimation = true;
|
||||||
page.actionBarHidden = false;
|
page.actionBarHidden = false;
|
||||||
page.frame.ios._disableNavBarAnimation = false;
|
page.frame.ios._disableNavBarAnimation = false;
|
||||||
this._actionBarHidden = undefined;
|
this._actionBarHiddenByTabView = undefined;
|
||||||
|
if (trace.enabled) {
|
||||||
|
trace.write(`TabView restored action bar`, trace.categories.Debug);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user