Syncronize networkToLocalManga because of data races
This commit is contained in:
parent
33ef1e7b01
commit
8799f0c091
@ -326,6 +326,7 @@ open class FeedPresenter(
|
||||
* @param sManga the manga from the source.
|
||||
* @return a manga from the database.
|
||||
*/
|
||||
@Synchronized
|
||||
private fun networkToLocalManga(sManga: SManga, sourceId: Long): Manga {
|
||||
var localManga = runBlocking { getManga.await(sManga.url, sourceId) }
|
||||
if (localManga == null) {
|
||||
|
@ -282,6 +282,7 @@ open class SourceFeedPresenter(
|
||||
* @param sManga the manga from the source.
|
||||
* @return a manga from the database.
|
||||
*/
|
||||
@Synchronized
|
||||
private fun networkToLocalManga(sManga: SManga, sourceId: Long): Manga {
|
||||
var localManga = runBlocking { getManga.await(sManga.url, sourceId) }
|
||||
if (localManga == null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user