mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 22:57:29 +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:
parent
9fe896bc65
commit
ace2688c8d
@ -47,7 +47,7 @@ public class FavoriteDataSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final void insertOrUpdateFavorite(@NonNull final Favorite favorite) {
|
public final void insertOrUpdateFavorite(@NonNull final Favorite favorite) {
|
||||||
if (favorite.getId() > 0) {
|
if (favorite.getId() != 0) {
|
||||||
favoriteDao.updateFavorites(favorite);
|
favoriteDao.updateFavorites(favorite);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user