Skip to content

Conversation

@hshristov
Copy link
Contributor

Fix #4950
Implemented custom fragment save/restore state.
When navigating back we reverse manually transitions/animations because we no longer add them to navite backstack.
Fragment instance stored on entry.
Animation and Transition listeners now holds reference to entry instead of fragment for easier update of fragment.
Animation and Transition listeners removed when entry removed from backstack.
Animation and Transition removed from fragment when fragment activity is destroyed.

@ghost ghost assigned hshristov Oct 16, 2017
@ghost ghost added the in progress label Oct 16, 2017
@@ -1,4 +1,4 @@
{
"name": "tns-samples-apps",
"main": "ui-tests-app/app.js"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this

class NoTransition extends Transition {
public createAndroidAnimator(transitionType: string): android.animation.Animator {
return createDummyZeroDurationAnimator();
export function _updateAnimations(entry: ExpandedEntry): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to _updateTransitions

return fragment[CALLBACKS] as FragmentCallbacks;
}

function updateCurrentFragmentTransitions(entry: ExpandedEntry): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks the same as _updateAnimations

animator.entry = null;
}

function clearTransitions(fragment: android.app.Fragment, removeListener: boolean): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to clearReenterAndExitTransitions


@profile
public onDestroy(fragment: android.app.Fragment, superFunc: Function): void {
const entry = this.entry;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entry and page are unsused

const entry = getFragmentCallbacks(fragment).entry;
switch (nextAnim) {
case enterFakeResourceId:
case AnimationType.enterFakeResourceId:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder: Move to frame.android

@hshristov hshristov force-pushed the fix-clear-history-transition branch from 029b197 to 3ea8596 Compare October 17, 2017 10:54
vakrilov and others added 3 commits October 18, 2017 10:35
Implemented custom fragment save/restore state.
When navigating back we reverse manually transitions/animations because we no longer add them to navite backstack.
Fragment instance stored on entry.
Animation and Transition listeners now holds reference to entry instead of fragment for easier update of fragment.
Animation and Transition listeners removed when entry removed from backstack.
Animation and Transition removed from fragment when fragment activity is destroyed.
Fixed bug where goBack took the last element in backstack while navigationQueue is not empty.
Fixed bug where goBack to specific entry in the backstack was removing that entry...
Removed duplicated method
Refactored method name
Fixed TS
@hshristov hshristov force-pushed the fix-clear-history-transition branch from 3ea8596 to 331ad27 Compare October 18, 2017 07:36
@SvetoslavTsenov
Copy link
Contributor

run uitests ios

@vchimev
Copy link
Contributor

vchimev commented Oct 19, 2017

ios-issues

@vchimev
Copy link
Contributor

vchimev commented Oct 19, 2017

ios-pickers

@vchimev
Copy link
Contributor

vchimev commented Oct 19, 2017

ios-textbase

@SvetoslavTsenov
Copy link
Contributor

@hshristov, good news. It seems this PR is good to be merged.

@hshristov hshristov merged commit 7c68953 into master Oct 20, 2017
@ghost ghost removed the in progress label Oct 20, 2017
@hshristov hshristov deleted the fix-clear-history-transition branch October 20, 2017 05:37
@lock
Copy link

lock bot commented Aug 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on android when application is suspended

7 participants