fixes
This commit is contained in:
parent
073a427ab7
commit
aff25b31e2
2 changed files with 5 additions and 1 deletions
|
|
@ -364,12 +364,16 @@ interface DownloadDao {
|
|||
|
||||
items.forEachIndexed { idx, it ->
|
||||
updateDownloadID(-(it.id), newIDs[idx])
|
||||
updateDownloadRowNumber(newIDs[idx], items.size - idx)
|
||||
}
|
||||
}
|
||||
|
||||
@Query("Update downloads set id=:newId where id=:id")
|
||||
suspend fun updateDownloadID(id: Long, newId: Long)
|
||||
|
||||
@Query("Update downloads set rowNumber=:newNr where id=:id")
|
||||
suspend fun updateDownloadRowNumber(id: Long, newNr: Int)
|
||||
|
||||
@Query("SELECT id from downloads WHERE id > :item1 AND id < :item2 AND status in (:statuses) ORDER BY id DESC")
|
||||
fun getIDsBetweenTwoItems(item1: Long, item2: Long, statuses: List<String>) : List<Long>
|
||||
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ class ConfigureMultipleDownloadsAdapter(onItemClickListener: OnItemClickListener
|
|||
companion object {
|
||||
private val DIFF_CALLBACK: DiffUtil.ItemCallback<DownloadItemConfigureMultiple> = object : DiffUtil.ItemCallback<DownloadItemConfigureMultiple>() {
|
||||
override fun areItemsTheSame(oldItem: DownloadItemConfigureMultiple, newItem: DownloadItemConfigureMultiple): Boolean {
|
||||
return oldItem.url == newItem.url
|
||||
return oldItem.id == newItem.id
|
||||
}
|
||||
|
||||
override fun areContentsTheSame(oldItem: DownloadItemConfigureMultiple, newItem: DownloadItemConfigureMultiple): Boolean {
|
||||
|
|
|
|||
Loading…
Reference in a new issue