fix: remove useless toList

This commit is contained in:
Harsh Shandilya 2023-06-09 01:54:02 +05:30
parent a5b90851c8
commit 90edeefd6e
No known key found for this signature in database

View file

@ -1,5 +1,5 @@
/* /*
* Copyright © 2022 Harsh Shandilya. * Copyright © 2022-2023 Harsh Shandilya.
* Use of this source code is governed by an MIT-style * Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT. * https://opensource.org/licenses/MIT.
@ -41,7 +41,6 @@ constructor(
.map { post -> lobstersApi.getPostDetails(post.shortId) } .map { post -> lobstersApi.getPostDetails(post.shortId) }
.filterIsInstance<Success<LobstersPostDetails>>() .filterIsInstance<Success<LobstersPostDetails>>()
.map { result -> result.value.toDbModel() } .map { result -> result.value.toDbModel() }
.toList()
.let { savedPostsRepository.savePosts(it) } .let { savedPostsRepository.savePosts(it) }
return Result.success() return Result.success()
} }