Skip to content

Commit

Permalink
SF-3114 Chapter audio only hides bottom bar if scripture text is shown (
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmyers authored Dec 18, 2024
1 parent e3e072a commit a13bb94
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ <h2 matSubheader>{{ t("filter_questions") }}</h2>
</div>
</div>
@if (projectDoc && totalVisibleQuestions() > 0) {
<div id="question-nav" [ngClass]="{ hide: (textHasFocus && isScreenSmall) || showScriptureAudioPlayer }">
<div id="question-nav" [ngClass]="{ hide: textboxIsShownMobile || userOpenedChapterAudio }">
@if (!isQuestionListPermanent) {
<button mat-button type="button" (click)="setQuestionsOverlayVisibility(true)">
{{ t("view_questions") }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,20 @@ export class CheckingComponent extends DataLoadingComponent implements OnInit, A
return this.projectDoc?.data?.checkingConfig.hideCommunityCheckingText ?? false;
}

get userOpenedChapterAudio(): boolean {
return this.showScriptureAudioPlayer && !this.hideChapterText;
}

get textboxIsShown(): boolean {
const isAnswering = this.answersPanel?.answerInput != null;
const isCommenting = this.answersPanel?.allComments?.find(c => c.inputComponent != null) != null;
return isAnswering || isCommenting;
}

get textboxIsShownMobile(): boolean {
return this.textboxIsShown && this.isScreenSmall;
}

get isRightToLeft(): boolean {
if (this.projectDoc?.data?.isRightToLeft != null) {
return this.projectDoc.data.isRightToLeft;
Expand Down Expand Up @@ -1082,12 +1096,6 @@ export class CheckingComponent extends DataLoadingComponent implements OnInit, A
}
}

get textHasFocus(): boolean {
const isAnswering = this.answersPanel?.answerInput != null;
const isCommenting = this.answersPanel?.allComments?.find(c => c.inputComponent != null) != null;
return isAnswering || isCommenting;
}

/**
* Retrieves the adjacent question based on the active question and the direction.
* Adjacent question might be outside the current filtered scope.
Expand Down

0 comments on commit a13bb94

Please sign in to comment.