mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Fixed: RedundantHigherOrderMapUsage detekt issue to reduce the memory usages
This commit is contained in:
parent
66874849e2
commit
f9496ddfd4
@ -295,13 +295,12 @@ class ZimHostFragment : BaseFragment(), ZimHostCallbacks, ZimHostContract.View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun select(bookOnDisk: BooksOnDiskListItem.BookOnDisk) {
|
private fun select(bookOnDisk: BooksOnDiskListItem.BookOnDisk) {
|
||||||
val booksList: List<BooksOnDiskListItem> =
|
val booksList: List<BooksOnDiskListItem> = booksAdapter.items.onEach {
|
||||||
booksAdapter.items.map {
|
if (it == bookOnDisk) {
|
||||||
if (it == bookOnDisk) {
|
it.isSelected = !it.isSelected
|
||||||
it.isSelected = !it.isSelected
|
|
||||||
}
|
|
||||||
it
|
|
||||||
}
|
}
|
||||||
|
it
|
||||||
|
}
|
||||||
booksAdapter.items = booksList
|
booksAdapter.items = booksList
|
||||||
saveHostedBooks(booksList)
|
saveHostedBooks(booksList)
|
||||||
if (ServerUtils.isServerStarted) {
|
if (ServerUtils.isServerStarted) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user