Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SF-3114 Make chapter audio only hide bottom bar if scripture text is shown #2905

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading