Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Listview: Fix refresh() #8489

Merged

Conversation

gabrielschulhof
Copy link

@gabrielschulhof gabrielschulhof commented Jul 28, 2016

@gabrielschulhof gabrielschulhof force-pushed the 8334-listview-refresh branch from c98ea80 to b6f2e66 Compare July 28, 2016 07:28
gabrielschulhof pushed a commit to gabrielschulhof/jquery-mobile that referenced this pull request Jul 28, 2016
@gabrielschulhof gabrielschulhof added this to the 1.5.0 milestone Jul 28, 2016
@gabrielschulhof gabrielschulhof force-pushed the 8334-listview-refresh branch from b6f2e66 to 6804dba Compare July 29, 2016 10:47
gabrielschulhof pushed a commit to gabrielschulhof/jquery-mobile that referenced this pull request Jul 29, 2016
  1. Fix signature of public refresh() method

  2. Move sparing _refresh() decision to backcompat

     The decision is delegated to extension points (one for the list item and
     one the anchor(s) it may contain) which are predicates that always return
     true if the backcompat extension is absent, indicating for every item that
     it is to be processed.

     When the backcompat extension is present, the extension points contain the
     class-examining regex-based decision of previous versions.

  3. Add method updateItems()

     In _refresh() we still need to retrieve all list items, even when we get a
     list of items from updateItems(), because the followings require global
     knowledge:

       - Which items have been removed since last time, so we can untrack them

       - Which is the first resp. last item for use with addFirstLastClasses()

Closes jquery-archivegh-8489
Fixes jquery-archivegh-8334
  1. Fix signature of public refresh() method

  2. Move sparing _refresh() decision to backcompat

     The decision is delegated to extension points (one for the list item and
     one the anchor(s) it may contain) which are predicates that always return
     true if the backcompat extension is absent, indicating for every item that
     it is to be processed.

     When the backcompat extension is present, the extension points contain the
     class-examining regex-based decision of previous versions.

  3. Add method updateItems()

     In _refresh() we still need to retrieve all list items, even when we get a
     list of items from updateItems(), because the followings require global
     knowledge:

       - Which items have been removed since last time, so we can untrack them

       - Which is the first resp. last item for use with addFirstLastClasses()

Closes jquery-archivegh-8489
Fixes jquery-archivegh-8334
@gabrielschulhof gabrielschulhof force-pushed the 8334-listview-refresh branch from 6804dba to e5b2562 Compare July 29, 2016 11:13
@gabrielschulhof gabrielschulhof merged commit e5b2562 into jquery-archive:1.5-dev Jul 29, 2016
gabrielschulhof pushed a commit that referenced this pull request Aug 11, 2016
  1. Fix signature of public refresh() method

  2. Move sparing _refresh() decision to backcompat

     The decision is delegated to extension points (one for the list item and
     one the anchor(s) it may contain) which are predicates that always return
     true if the backcompat extension is absent, indicating for every item that
     it is to be processed.

     When the backcompat extension is present, the extension points contain the
     class-examining regex-based decision of previous versions.

  3. Add method updateItems()

     In _refresh() we still need to retrieve all list items, even when we get a
     list of items from updateItems(), because the followings require global
     knowledge:

       - Which items have been removed since last time, so we can untrack them

       - Which is the first resp. last item for use with addFirstLastClasses()

Closes gh-8489
Fixes gh-8334
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants