mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Garmin: Do not set nextPageId if unknown
This commit is contained in:
+8
-5
@@ -95,12 +95,15 @@ class FileSyncServiceHandler(val deviceSupport: GarminSupport) {
|
||||
fun requestFileList(): GdiFileSyncService.FileSyncService {
|
||||
LOG.debug("Requesting file list starting at page {}", nextPageId)
|
||||
|
||||
val fileListRequestBuilder = GdiFileSyncService.FileListRequest.newBuilder().apply {
|
||||
flags1 = GdiFileSyncService.FileId.newBuilder().setId1(42405).setId2(42405).build()
|
||||
flags2 = GdiFileSyncService.FileId.newBuilder().setId1(42405).setId2(42405).build()
|
||||
}
|
||||
|
||||
nextPageId?.let { fileListRequestBuilder.startPageId = it }
|
||||
|
||||
return GdiFileSyncService.FileSyncService.newBuilder().buildWith {
|
||||
fileListRequest = GdiFileSyncService.FileListRequest.newBuilder().buildWith {
|
||||
startPageId = nextPageId ?: 0
|
||||
flags1 = GdiFileSyncService.FileId.newBuilder().setId1(42405).setId2(42405).build()
|
||||
flags2 = GdiFileSyncService.FileId.newBuilder().setId1(42405).setId2(42405).build()
|
||||
}
|
||||
fileListRequest = fileListRequestBuilder.build()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user