nextNoteVault #23
@ -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