Skip to content

Commit

Permalink
AMA changes to support disk cache
Browse files Browse the repository at this point in the history
Reviewed By: fred2028

Differential Revision: D6295287

fbshipit-source-id: 70ae7dfba2edb36e758ad0e22916015038108d36
  • Loading branch information
Wenjing Wang authored and facebook-github-bot committed Nov 12, 2017
1 parent aa83b5a commit d79e245
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Libraries/Experimental/SwipeableRow/SwipeableListViewDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ class SwipeableListViewDataSource {
return Object.keys(this._dataBlob)[0];
}

getLastRowID(): ?string {
if (this.rowIdentities && this.rowIdentities.length) {
const lastSection = this.rowIdentities[this.rowIdentities.length - 1];
if (lastSection && lastSection.length) {
return lastSection[lastSection.length - 1];
}
}
return Object.keys(this._dataBlob)[this._dataBlob.length - 1];
}

setOpenRowID(rowID: string): SwipeableListViewDataSource {
this._previousOpenRowID = this._openRowID;
this._openRowID = rowID;
Expand Down

0 comments on commit d79e245

Please sign in to comment.