From d016e394e403e18d582ace23c19b027d003fdd29 Mon Sep 17 00:00:00 2001 From: Zsolt Bertalan Date: Sat, 2 Nov 2024 12:48:18 +0000 Subject: [PATCH] Fix PopularMovies database writing bug --- .../zsoltbertalan/flickslate/movies/data/db/PopularMoviesDao.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/zsoltbertalan/flickslate/movies/data/db/PopularMoviesDao.kt b/app/src/main/java/com/zsoltbertalan/flickslate/movies/data/db/PopularMoviesDao.kt index 1d023e8..0b92966 100644 --- a/app/src/main/java/com/zsoltbertalan/flickslate/movies/data/db/PopularMoviesDao.kt +++ b/app/src/main/java/com/zsoltbertalan/flickslate/movies/data/db/PopularMoviesDao.kt @@ -37,7 +37,7 @@ class PopularMoviesDao @Inject constructor( override suspend fun insertPopularMovies(movies: List, page: Int) { runCatchingUnit { realm.write { - movies.map { copyToRealm(it.toPopularMoviesDbo(page), UpdatePolicy.ERROR) } + movies.map { copyToRealm(it.toPopularMoviesDbo(page), UpdatePolicy.ALL) } } } }