mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Changed the order of deletion and saving of items at the time of synchronization
This commit is contained in:
parent
01785b7bed
commit
86fcc8b479
13 changed files with 138 additions and 51 deletions
|
|
@ -29,7 +29,7 @@ import com.cappielloantonio.play.model.Song;
|
|||
import com.cappielloantonio.play.model.SongArtistCross;
|
||||
import com.cappielloantonio.play.model.SongGenreCross;
|
||||
|
||||
@Database(entities = {Album.class, Artist.class, Genre.class, Playlist.class, Song.class, RecentSearch.class, SongGenreCross.class, Queue.class, AlbumArtistCross.class, SongArtistCross.class, PlaylistSongCross.class}, version = 12, exportSchema = false)
|
||||
@Database(entities = {Album.class, Artist.class, Genre.class, Playlist.class, Song.class, RecentSearch.class, SongGenreCross.class, Queue.class, AlbumArtistCross.class, SongArtistCross.class, PlaylistSongCross.class}, version = 13, exportSchema = false)
|
||||
public abstract class AppDatabase extends RoomDatabase {
|
||||
private static final String TAG = "AppDatabase";
|
||||
private final static String DB_NAME = "play_db";
|
||||
|
|
@ -38,7 +38,7 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||
public static synchronized AppDatabase getInstance(Context context) {
|
||||
|
||||
if (instance == null && context != null) {
|
||||
instance = Room.databaseBuilder(context.getApplicationContext(), AppDatabase.class, DB_NAME)
|
||||
instance = Room.databaseBuilder(context, AppDatabase.class, DB_NAME)
|
||||
.fallbackToDestructiveMigration()
|
||||
.build();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue