You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 10, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: PagingWithNetworkSample/app/src/main/java/com/android/example/paging/pagingwithnetwork/reddit/db/RedditPostDao.kt
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -28,12 +28,10 @@ interface RedditPostDao {
28
28
@Insert(onConflict =OnConflictStrategy.REPLACE)
29
29
suspendfuninsertAll(posts:List<RedditPost>)
30
30
31
-
@Query("SELECT * FROM posts WHERE subreddit = :subreddit ORDER BY indexInResponse ASC")
31
+
// Order by _id which is an immutable key to help maintain consistent item ordering
32
+
@Query("SELECT * FROM posts WHERE subreddit = :subreddit ORDER BY _id ASC")
Copy file name to clipboardExpand all lines: PagingWithNetworkSample/app/src/test-common/java/com/android/example/paging/pagingwithnetwork/repository/PostFactory.kt
Copy file name to clipboardExpand all lines: PagingWithNetworkSample/lib/src/main/java/com/android/example/paging/pagingwithnetwork/reddit/vo/RedditPost.kt
0 commit comments