Skip to content

Commit

Permalink
Revert "tweak studyCtrl.setChapter"
Browse files Browse the repository at this point in the history
This reverts commit b87f44f.
  • Loading branch information
ornicar committed Mar 14, 2024
1 parent 26cd13b commit 5f16c05
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ui/analyse/src/study/studyCtrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,13 +444,12 @@ export default class StudyCtrl {
likeToggler = debounce(() => this.send('like', { liked: this.data.liked }), 1000);

setChapter = (id: string, force?: boolean) => {
if (id === this.vm.chapterId && !force) {
if (this.relay?.tourShow()) {
this.relay?.tourShow(false);
this.redraw();
}
return;
const alreadySet = id === this.vm.chapterId && !force;
if (this.relay?.tourShow()) {
this.relay.tourShow(false);
if (alreadySet) this.redraw();
}
if (alreadySet) return;
if (!this.vm.mode.sticky || !this.makeChange('setChapter', id)) {
this.vm.mode.sticky = false;
if (!this.vm.behind) this.vm.behind = 1;
Expand Down

0 comments on commit 5f16c05

Please sign in to comment.