1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-12-23 13:26:59 +00:00

For db update check id != 0 instead of id > 0.

Fixes an issue when the entry was saved with -1 in earlier stages of dev.
This commit is contained in:
Ammar Githam 2021-03-24 22:26:11 +09:00
parent 9fe896bc65
commit ace2688c8d

View File

@ -47,7 +47,7 @@ public class FavoriteDataSource {
}
public final void insertOrUpdateFavorite(@NonNull final Favorite favorite) {
if (favorite.getId() > 0) {
if (favorite.getId() != 0) {
favoriteDao.updateFavorites(favorite);
return;
}