Skip to content

Commit d79e245

Browse files
Wenjing Wangfacebook-github-bot
Wenjing Wang
authored andcommitted
AMA changes to support disk cache
Reviewed By: fred2028 Differential Revision: D6295287 fbshipit-source-id: 70ae7dfba2edb36e758ad0e22916015038108d36
1 parent aa83b5a commit d79e245

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Libraries/Experimental/SwipeableRow/SwipeableListViewDataSource.js

+10
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ class SwipeableListViewDataSource {
8888
return Object.keys(this._dataBlob)[0];
8989
}
9090

91+
getLastRowID(): ?string {
92+
if (this.rowIdentities && this.rowIdentities.length) {
93+
const lastSection = this.rowIdentities[this.rowIdentities.length - 1];
94+
if (lastSection && lastSection.length) {
95+
return lastSection[lastSection.length - 1];
96+
}
97+
}
98+
return Object.keys(this._dataBlob)[this._dataBlob.length - 1];
99+
}
100+
91101
setOpenRowID(rowID: string): SwipeableListViewDataSource {
92102
this._previousOpenRowID = this._openRowID;
93103
this._openRowID = rowID;

0 commit comments

Comments
 (0)