Skip to content

Commit

Permalink
Merge pull request #20027 from wordpress-mobile/andy/issue-20026
Browse files Browse the repository at this point in the history
[Bug] Move a small bug fix to a more appropriate place.
  • Loading branch information
irfano authored Feb 19, 2024
2 parents 7f03846 + 5984102 commit c9602d9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class DeviceListBuilder(
// This item sets the threshold for the visible items in all the list
val lastShownTimestamp = results.fold(0L) { timestamp, (_, result) ->
val nextTimestamp = result?.nextTimestamp
if (result?.items?.isNotEmpty() == true && nextTimestamp != null && nextTimestamp > timestamp) {
if (nextTimestamp != null && nextTimestamp > timestamp) {
nextTimestamp
} else {
timestamp
Expand Down Expand Up @@ -118,7 +118,7 @@ class DeviceListBuilder(
null
}
}
addPage(mediaType, result, deviceMediaList.next)
addPage(mediaType, result, if (result.isEmpty()) null else deviceMediaList.next)
return cache[mediaType]
}

Expand Down

0 comments on commit c9602d9

Please sign in to comment.