diff --git a/app/src/main/java/gallery/memories/service/TimelineQuery.kt b/app/src/main/java/gallery/memories/service/TimelineQuery.kt index d20d95e3..468ea3ed 100644 --- a/app/src/main/java/gallery/memories/service/TimelineQuery.kt +++ b/app/src/main/java/gallery/memories/service/TimelineQuery.kt @@ -108,9 +108,8 @@ import java.util.concurrent.CountDownLatch fun getSystemImagesByAUIDs(auids: List): List { val photos = mPhotoDao.getPhotosByAUIDs(auids) - val fileIds = photos.map { it.localId } - if (fileIds.isEmpty()) return listOf() - return SystemImage.getByIds(mCtx, fileIds) + if (photos.isEmpty()) return listOf() + return SystemImage.getByIds(mCtx, photos.map { it.localId }) } @Throws(JSONException::class) @@ -181,9 +180,7 @@ import java.util.concurrent.CountDownLatch @Throws(Exception::class) fun delete(auids: List, dry: Boolean): JSONObject { synchronized(this) { - if (deleting) { - throw Exception("Already deleting another set of images") - } + if (deleting) throw Exception("Already deleting another set of images") deleting = true }