Check if already running before removing watched
This commit is contained in:
parent
6571fdbaa2
commit
92ca1e6e09
1 changed files with 5 additions and 7 deletions
|
@ -369,12 +369,11 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeWatchedStreams() {
|
public void removeWatchedStreams() {
|
||||||
showLoading();
|
if (removeWatchedDisposable != null && !removeWatchedDisposable.isDisposed()) {
|
||||||
|
// already running
|
||||||
if (removeWatchedDisposable != null) {
|
return;
|
||||||
// In case this is called twice
|
|
||||||
removeWatchedDisposable.dispose();
|
|
||||||
}
|
}
|
||||||
|
showLoading();
|
||||||
|
|
||||||
removeWatchedDisposable = Flowable.just(
|
removeWatchedDisposable = Flowable.just(
|
||||||
playlistManager.getPlaylistStreams(playlistId).blockingFirst())
|
playlistManager.getPlaylistStreams(playlistId).blockingFirst())
|
||||||
|
@ -431,8 +430,7 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
|
||||||
}
|
}
|
||||||
|
|
||||||
hideLoading();
|
hideLoading();
|
||||||
}, this::onError
|
}, this::onError);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue