mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
Fix that thumbnails persist after deleting a download
This commit is contained in:
parent
8322fbd5c9
commit
1e239faf03
@ -95,10 +95,13 @@ class DownloadsAdapter(
|
|||||||
.setMessage(R.string.irreversible)
|
.setMessage(R.string.irreversible)
|
||||||
.setPositiveButton(R.string.okay) { _, _ ->
|
.setPositiveButton(R.string.okay) { _, _ ->
|
||||||
items.map { File(it.path) }.forEach { file ->
|
items.map { File(it.path) }.forEach { file ->
|
||||||
if (file.exists()) {
|
runCatching {
|
||||||
try {
|
if (file.exists()) file.delete()
|
||||||
file.delete()
|
}
|
||||||
} catch (_: Exception) { }
|
}
|
||||||
|
runCatching {
|
||||||
|
download.thumbnailPath?.let {
|
||||||
|
File(it).delete()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user