| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3a8c3fc commit 1f1d722
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -85,10 +85,14 @@ function getAttachListener(): android.view.View.OnAttachStateChangeListener { | |||
| 85 | 85 | export function reloadPage(): void { | |
| 86 | 86 | const activity = application.android.foregroundActivity; | |
| 87 | 87 | const callbacks: AndroidActivityCallbacks = activity[CALLBACKS]; | |
| 88 | - const rootView: View = callbacks.getRootView(); | ||
| 88 | + if (callbacks) { | ||
| 89 | + const rootView: View = callbacks.getRootView(); | ||
| 89 | 90 | ||
| 90 | - if (!rootView || !rootView._onLivesync()) { | ||
| 91 | - callbacks.resetActivityContent(activity); | ||
| 91 | + if (!rootView || !rootView._onLivesync()) { | ||
| 92 | + callbacks.resetActivityContent(activity); | ||
| 93 | + } | ||
| 94 | + } else { | ||
| 95 | + traceError(`${activity}[CALLBACKS] is null or undefined`); | ||
| 92 | 96 | } | |
| 93 | 97 | } | |
| 94 | 98 | ||
@@ -469,19 +473,19 @@ export class Frame extends FrameBase { | |||
| 469 | 473 | switch (this.actionBarVisibility) { | |
| 470 | 474 | case "never": | |
| 471 | 475 | return false; | |
| 472 | - | ||
| 476 | + | ||
| 473 | 477 | case "always": | |
| 474 | 478 | return true; | |
| 475 | - | ||
| 479 | + | ||
| 476 | 480 | default: | |
| 477 | 481 | if (page.actionBarHidden !== undefined) { | |
| 478 | 482 | return !page.actionBarHidden; | |
| 479 | 483 | } | |
| 480 | - | ||
| 484 | + | ||
| 481 | 485 | if (this._android && this._android.showActionBar !== undefined) { | |
| 482 | 486 | return this._android.showActionBar; | |
| 483 | 487 | } | |
| 484 | - | ||
| 488 | + | ||
| 485 | 489 | return true; | |
| 486 | 490 | } | |
| 487 | 491 | } | |
@@ -530,15 +534,15 @@ function restoreAnimatorState(entry: BackstackEntry, snapshot: AnimatorState): v | |||
| 530 | 534 | if (snapshot.enterAnimator) { | |
| 531 | 535 | expandedEntry.enterAnimator = snapshot.enterAnimator; | |
| 532 | 536 | } | |
| 533 | - | ||
| 537 | + | ||
| 534 | 538 | if (snapshot.exitAnimator) { | |
| 535 | 539 | expandedEntry.exitAnimator = snapshot.exitAnimator; | |
| 536 | 540 | } | |
| 537 | 541 | ||
| 538 | 542 | if (snapshot.popEnterAnimator) { | |
| 539 | 543 | expandedEntry.popEnterAnimator = snapshot.popEnterAnimator; | |
| 540 | 544 | } | |
| 541 | - | ||
| 545 | + | ||
| 542 | 546 | if (snapshot.popExitAnimator) { | |
| 543 | 547 | expandedEntry.popExitAnimator = snapshot.popExitAnimator; | |
| 544 | 548 | } | |
@@ -858,7 +862,7 @@ class FragmentCallbacksImplementation implements AndroidFragmentCallbacks { | |||
| 858 | 862 | // parent while its supposed parent believes it properly removed its children; in order to "force" the child to | |
| 859 | 863 | // lose its parent we temporarily add it to the parent, and then remove it (addViewInLayout doesn't trigger layout pass) | |
| 860 | 864 | const nativeView = page.nativeViewProtected; | |
| 861 | - if (nativeView != null) { | ||
| 865 | + if (nativeView != null) { | ||
| 862 | 866 | const parentView = nativeView.getParent(); | |
| 863 | 867 | if (parentView instanceof android.view.ViewGroup) { | |
| 864 | 868 | if (parentView.getChildCount() === 0) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments