Giter Site home page Giter Site logo

Comments (6)

liangjingkanji avatar liangjingkanji commented on June 12, 2024

你确定refresh/autoRefresh/showLoading等函数只有调用一次吗? 因为他们调用一次就执行一次onRefresh

from brv.

fengtech avatar fengtech commented on June 12, 2024

页面返回时候应该没有机会调用这几个函数,真是奇怪了

from brv.

liangjingkanji avatar liangjingkanji commented on June 12, 2024

你打日志查看, 要肯定. 或者你能在Demo里面复现

from brv.

fengtech avatar fengtech commented on June 12, 2024
    var scope: CoroutineScope? = null
    binding.filterEdit.debounce().listen(this) {
        scope?.cancel() // 发起新的请求前取消旧的请求, 避免旧数据覆盖新数据
        scope = scopeNetLife { // 保存旧的请求到一个变量中, scopeNetLife其函数决定网络请求生命周期
            toast("debounce")
            req()
        }
    }

排查出来这这段代码影响, 页面返回时候req()会重复执行

from brv.

liangjingkanji avatar liangjingkanji commented on June 12, 2024

在onCreate函数里面写的吗?页面被销毁了?

from brv.

liangjingkanji avatar liangjingkanji commented on June 12, 2024

你查看Demo EditDebounceFragment是否存在这种情况?
我这边无法复现这个问题

from brv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.