Skip to content

SupportActivity#popTo方法中afterPopTransactionRunnable在popTo之前就执行了 #778

@palatine

Description

@palatine

大神你好, 请问下我升级到v1.2.6之后发现以前的页面pop异常, 查看源码发现popTo的实现有所改变,

void popTo(final String targetFragmentTag, final boolean includeTargetFragment, final Runnable afterPopTransactionRunnable, final FragmentManager fm, final int popAnim) {
        enqueue(fm, new Action(Action.ACTION_POP_MOCK) {
            @Override
            public void run() {
                doPopTo(targetFragmentTag, includeTargetFragment, afterPopTransactionRunnable, fm, popAnim);
            }
        });
        if (afterPopTransactionRunnable != null) {
            afterPopTransactionRunnable.run();  <-- 已经被执行了
        }
    }

当前请求被enqueue之后, afterPopTransactionRunnable就立即被执行了? 我理解应该是执行完popTo真正完成之后才会执行afterPopTransactionRunnable吧?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions