clear history fix
This commit is contained in:
parent
66c6c360a8
commit
9e80a0bb34
|
@ -49,6 +49,11 @@ public class VideoStateService implements ProfileChangeListener {
|
|||
mStates.remove(videoId);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
mStates.clear();
|
||||
persistState();
|
||||
}
|
||||
|
||||
private void restoreState() {
|
||||
mStates.clear();
|
||||
String data = mPrefs.getStateUpdaterData();
|
||||
|
|
|
@ -11,6 +11,7 @@ import com.liskovsoft.sharedutils.rx.RxHelper;
|
|||
import com.liskovsoft.smartyoutubetv2.common.R;
|
||||
import com.liskovsoft.smartyoutubetv2.common.app.models.data.BrowseSection;
|
||||
import com.liskovsoft.smartyoutubetv2.common.app.models.data.Video;
|
||||
import com.liskovsoft.smartyoutubetv2.common.app.models.playback.service.VideoStateService;
|
||||
import com.liskovsoft.smartyoutubetv2.common.app.models.playback.ui.UiOptionItem;
|
||||
import com.liskovsoft.smartyoutubetv2.common.app.presenters.AppDialogPresenter;
|
||||
import com.liskovsoft.smartyoutubetv2.common.app.presenters.BrowsePresenter;
|
||||
|
@ -509,6 +510,7 @@ public abstract class BaseMenuPresenter extends BasePresenter<Void> {
|
|||
optionItem -> AppDialogUtil.showConfirmationDialog(getContext(),
|
||||
getContext().getString(R.string.clear_history), () -> {
|
||||
mServiceManager.clearHistory();
|
||||
VideoStateService.instance(getContext()).clear();
|
||||
getDialogPresenter().closeDialog();
|
||||
presenter.refresh();
|
||||
})));
|
||||
|
|
Loading…
Reference in New Issue