FIXME:
This commit is contained in:
parent
6f6e9a3b10
commit
dfabf7e721
@ -100,7 +100,19 @@ public class SongSyncModule {
|
||||
|
||||
public void getRemotelyModifiedSongData(List<Song> freshlyCreatedSongs) {
|
||||
songSyncRepository.loadRemotelyModifiedSongs(songs -> {
|
||||
songs.addAll(freshlyCreatedSongs);
|
||||
for(Song song : freshlyCreatedSongs) {
|
||||
boolean freshlyCreatedSongFound = false;
|
||||
for(Song s : songs) {
|
||||
if(s.getServerID().equals(song.getServerID())) {
|
||||
freshlyCreatedSongFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!freshlyCreatedSongFound) {
|
||||
songs.add(song);
|
||||
}
|
||||
|
||||
}
|
||||
if(songs.isEmpty()) {
|
||||
syncViewModel.finishFetching();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user