mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 08:30:44 +00:00
Update playlists in parallel
This commit is contained in:
parent
9ecef6f011
commit
4e401bc059
@ -454,21 +454,16 @@ public final class BookmarkFragment extends BaseLocalListFragment<List<PlaylistL
|
||||
|
||||
// 1. Update local playlists
|
||||
// 2. Update remote playlists
|
||||
// 3. Set isModified false
|
||||
// 3. Set NoChangesToSave
|
||||
disposables.add(localPlaylistManager.updatePlaylists(localItemsUpdate, localItemsDeleteUid)
|
||||
.mergeWith(remotePlaylistManager.updatePlaylists(
|
||||
remoteItemsUpdate, remoteItemsDeleteUid))
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(() -> disposables.add(remotePlaylistManager.updatePlaylists(
|
||||
remoteItemsUpdate, remoteItemsDeleteUid)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(() -> {
|
||||
if (debounceSaver != null) {
|
||||
debounceSaver.setNoChangesToSave();
|
||||
}
|
||||
},
|
||||
throwable -> showError(new ErrorInfo(throwable,
|
||||
UserAction.REQUESTED_BOOKMARK,
|
||||
"Saving playlist"))
|
||||
)),
|
||||
.subscribe(() -> {
|
||||
if (debounceSaver != null) {
|
||||
debounceSaver.setNoChangesToSave();
|
||||
}
|
||||
},
|
||||
throwable -> showError(new ErrorInfo(throwable,
|
||||
UserAction.REQUESTED_BOOKMARK, "Saving playlist"))
|
||||
));
|
||||
|
Loading…
Reference in New Issue
Block a user