-Fixed playlist fragment infinite update cycle.

-Updated Room DB version to 1.1.0.
This commit is contained in:
John Zhen Mo 2018-05-16 18:08:19 -07:00
parent 13587d7ab3
commit 0a2dbc4688

View file

@ -289,7 +289,6 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
remotePlaylistManager.getPlaylist(result)
.flatMap(lists -> getUpdateProcessor(lists, result), (lists, id) -> lists)
.onBackpressureLatest()
.flatMap(lists -> getUpdateProcessor(lists, result), (lists, id) -> lists)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(getPlaylistBookmarkSubscriber());
@ -355,6 +354,7 @@ public class PlaylistFragment extends BaseListInfoFragment<PlaylistInfo> {
final PlaylistRemoteEntity playlistEntity = playlists.get(0);
if (playlistEntity.isIdenticalTo(result)) return noItemToUpdate;
return remotePlaylistManager.onUpdate(playlists.get(0).getUid(), result).toFlowable();
}