Skip to content

Commit 6d98c98

Browse files
committed
refactor: avoid unnecessary function override
1 parent 19b48b5 commit 6d98c98

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

app/src/main/java/com/github/libretube/util/DeArrowUtil.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ private data class CacheObject(val value: DeArrowContent?);
1212

1313
object DeArrowUtil {
1414
// we cannot use segment data directly, as LruCache expects non-null objects, but we also want to cache unlabeled videos
15-
private val memoryCache = object : LruCache<String, CacheObject?>(256) {
16-
override fun sizeOf(key: String, value: CacheObject?): Int = 1
17-
}
15+
private val memoryCache = LruCache<String, CacheObject?>(256)
1816

1917
private fun extractTitleAndThumbnail(content: DeArrowContent): Pair<String?, String?> {
2018
val title = content.titles.firstOrNull { it.votes >= 0 || it.locked }?.title

0 commit comments

Comments
 (0)