mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
chore: merge release in master (#8275)
* fix the crash * chore: update MaterialComponents pod (#8176) * chore: update MaterialComponents pod * chore: remove copy of pod file in build script * chore: cut the 6.3.0 release (#8174) * hore: cut the 6.3.1 release * fix: handle fake attach after FragMgr is destroyed (#8200) * fix: check is disposed fragment is in the FragmentManager (#8201) * release: cut the 6.3.2 release Co-authored-by: hamidbsd <50081218+hamidbsd@users.noreply.github.com> Co-authored-by: Vasil Trifonov <v.trifonov@gmail.com> Co-authored-by: Dimitar Topuzov <dtopuzov@gmail.com>
This commit is contained in:

committed by
GitHub

parent
02763ecd2c
commit
e57d5d9da1
@ -1,4 +1,4 @@
|
||||
platform :ios, '9.0'
|
||||
use_frameworks!
|
||||
|
||||
pod 'MaterialComponents/Tabs', '~> 92.3'
|
||||
pod 'MaterialComponents/Tabs', '~> 94.5'
|
@ -385,14 +385,14 @@ export class BottomNavigation extends TabNavigationBase {
|
||||
|
||||
_onAttachedToWindow(): void {
|
||||
super._onAttachedToWindow();
|
||||
this._attachedToWindow = true;
|
||||
|
||||
// _onAttachedToWindow called from OS again after it was detach
|
||||
// TODO: Consider testing and removing it when update to androidx.fragment:1.2.0
|
||||
if (this._manager && this._manager.isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
this._attachedToWindow = true;
|
||||
this.changeTab(this.selectedIndex);
|
||||
}
|
||||
|
||||
|
@ -156,6 +156,8 @@ function initializeDialogFragment() {
|
||||
const ownerId = this.getArguments().getInt(DOMID);
|
||||
const options = getModalOptions(ownerId);
|
||||
this.owner = options.owner;
|
||||
// Set owner._dialogFragment to this in case the DialogFragment was recreated after app suspend
|
||||
this.owner._dialogFragment = this;
|
||||
this._fullscreen = options.fullscreen;
|
||||
this._animated = options.animated;
|
||||
this._cancelable = options.cancelable;
|
||||
@ -381,11 +383,13 @@ export class View extends ViewCommon {
|
||||
@profile
|
||||
public onUnloaded() {
|
||||
if (this.touchListenerIsSet) {
|
||||
this.nativeViewProtected.setOnTouchListener(null);
|
||||
this.touchListenerIsSet = false;
|
||||
this.nativeViewProtected.setClickable(this._isClickable);
|
||||
if (this.nativeViewProtected) {
|
||||
this.nativeViewProtected.setOnTouchListener(null);
|
||||
this.nativeViewProtected.setClickable(this._isClickable);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this._manager = null;
|
||||
this._rootManager = null;
|
||||
super.onUnloaded();
|
||||
|
@ -150,14 +150,14 @@ export class Frame extends FrameBase {
|
||||
|
||||
_onAttachedToWindow(): void {
|
||||
super._onAttachedToWindow();
|
||||
this._attachedToWindow = true;
|
||||
|
||||
|
||||
// _onAttachedToWindow called from OS again after it was detach
|
||||
// TODO: Consider testing and removing it when update to androidx.fragment:1.2.0
|
||||
if (this._manager && this._manager.isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
this._attachedToWindow = true;
|
||||
this._processNextNavigationEntry();
|
||||
}
|
||||
|
||||
@ -264,13 +264,13 @@ export class Frame extends FrameBase {
|
||||
!this._currentEntry.fragment.isAdded()) {
|
||||
return;
|
||||
}
|
||||
const fragment: androidx.fragment.app.Fragment = this._currentEntry.fragment;
|
||||
const fragmentManager: androidx.fragment.app.FragmentManager = fragment.getFragmentManager();
|
||||
|
||||
const manager: androidx.fragment.app.FragmentManager = this._getFragmentManager();
|
||||
const transaction = manager.beginTransaction();
|
||||
const fragment = this._currentEntry.fragment;
|
||||
const transaction = fragmentManager.beginTransaction();
|
||||
const fragmentExitTransition = fragment.getExitTransition();
|
||||
|
||||
// Reset animation to its initial state to prevent mirrorered effect when restore current fragment transitions
|
||||
// Reset animation to its initial state to prevent mirrored effect when restore current fragment transitions
|
||||
if (fragmentExitTransition && fragmentExitTransition instanceof org.nativescript.widgets.CustomTransition) {
|
||||
fragmentExitTransition.setResetOnTransitionEnd(true);
|
||||
}
|
||||
@ -637,7 +637,7 @@ function clearEntry(entry: BackstackEntry): void {
|
||||
entry.recreated = false;
|
||||
entry.fragment = null;
|
||||
const page = entry.resolvedPage;
|
||||
if (page._context) {
|
||||
if (page && page._context) {
|
||||
entry.resolvedPage._tearDownUI(true);
|
||||
}
|
||||
}
|
||||
@ -1032,6 +1032,12 @@ class FragmentCallbacksImplementation implements AndroidFragmentCallbacks {
|
||||
}
|
||||
|
||||
private loadBitmapFromView(view: android.view.View): android.graphics.Bitmap {
|
||||
// Don't try to creat bitmaps with no dimensions as this causes a crash
|
||||
// This might happen when showing and closing dialogs fast.
|
||||
if (!(view && view.getWidth() > 0 && view.getHeight() > 0)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Another way to get view bitmap. Test performance vs setDrawingCacheEnabled
|
||||
// const width = view.getWidth();
|
||||
// const height = view.getHeight();
|
||||
@ -1041,7 +1047,8 @@ class FragmentCallbacksImplementation implements AndroidFragmentCallbacks {
|
||||
// view.draw(canvas);
|
||||
|
||||
view.setDrawingCacheEnabled(true);
|
||||
const bitmap = android.graphics.Bitmap.createBitmap(view.getDrawingCache());
|
||||
const drawCache = view.getDrawingCache();
|
||||
const bitmap = android.graphics.Bitmap.createBitmap(drawCache);
|
||||
view.setDrawingCacheEnabled(false);
|
||||
|
||||
return bitmap;
|
||||
|
@ -6,8 +6,6 @@ import {
|
||||
export { ios };
|
||||
export * from "./utils-common";
|
||||
|
||||
let mainScreenScale;
|
||||
|
||||
export function openFile(filePath: string): boolean {
|
||||
try {
|
||||
const appPath = ios.getCurrentAppPath();
|
||||
@ -47,5 +45,3 @@ export function openUrl(location: string): boolean {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
mainScreenScale = UIScreen.mainScreen.scale;
|
Reference in New Issue
Block a user