Skip to content

Commit 93615cb

Browse files
authored
Remove dead code (#3529)
1 parent 0a7df6b commit 93615cb

File tree

13 files changed

+0
-107
lines changed

13 files changed

+0
-107
lines changed

src/SIL.XForge.Scripture/ClientApp/src/app/checking/chapter-audio-dialog/chapter-audio-dialog.component.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export class ChapterAudioDialogComponent implements AfterViewInit, OnDestroy {
6161
private _chapter: number = 1;
6262
private textAudioQuery?: RealtimeQuery<TextAudioDoc>;
6363
private timing: AudioTiming[] = [];
64-
private _editState: boolean = false;
6564
private _selectionHasAudioAlready: boolean = false;
6665
private _audioLength: number = 0;
6766
private _audioBlob?: string;
@@ -153,10 +152,6 @@ export class ChapterAudioDialogComponent implements AfterViewInit, OnDestroy {
153152
return this.timing_processed.length;
154153
}
155154

156-
get inEditState(): boolean {
157-
return this._editState;
158-
}
159-
160155
get isLoadingAudio(): boolean {
161156
return this._loadingAudio;
162157
}
@@ -515,7 +510,6 @@ export class ChapterAudioDialogComponent implements AfterViewInit, OnDestroy {
515510
if (doc == null) {
516511
return;
517512
}
518-
this._editState = true;
519513
this.timing = this.timing_processed = doc.timings;
520514
this.fileService
521515
.findOrUpdateCache(FileType.Audio, TextAudioDoc.COLLECTION, textAudioId, doc.audioUrl)

src/SIL.XForge.Scripture/ClientApp/src/app/checking/checking/checking-answers/checking-answers.component.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,6 @@ export class CheckingAnswersComponent implements OnInit {
234234
return this.project == null ? false : this.project.checkingConfig.usersSeeEachOthersResponses;
235235
}
236236

237-
get canShowScriptureInput(): boolean {
238-
return !!this.selectedText;
239-
}
240-
241237
get currentUserTotalAnswers(): number {
242238
if (this._questionDoc == null || this._questionDoc.data == null) {
243239
return 0;
@@ -256,15 +252,6 @@ export class CheckingAnswersComponent implements OnInit {
256252
return answer !== undefined ? answer : null;
257253
}
258254

259-
get hasUserRead(): boolean {
260-
return this.projectUserConfigDoc != null &&
261-
this.projectUserConfigDoc.data != null &&
262-
this._questionDoc != null &&
263-
this._questionDoc.data != null
264-
? this.projectUserConfigDoc.data.questionRefsRead.includes(this._questionDoc.data.dataId)
265-
: false;
266-
}
267-
268255
get canEditQuestion(): boolean {
269256
const userId = this.userService.currentUserId;
270257
const data = this.questionDoc?.data;

src/SIL.XForge.Scripture/ClientApp/src/app/checking/checking/checking-questions/checking-questions.component.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,6 @@ export class CheckingQuestionsComponent implements OnInit, OnChanges {
187187
return this.activeQuestionDoc?.data == null ? undefined : this.activeQuestionDoc.data.verseRef.bookNum;
188188
}
189189

190-
get activeQuestionChapter(): number | undefined {
191-
return this.activeQuestionDoc?.data == null ? undefined : this.activeQuestionDoc.data.verseRef.chapterNum;
192-
}
193-
194190
get activeQuestionIndex(): number {
195191
if (this.activeQuestionDoc == null) {
196192
return -1;
@@ -385,14 +381,6 @@ export class CheckingQuestionsComponent implements OnInit, OnChanges {
385381
return config != null && (config.commentRefsRead.includes(comment.dataId) || config.ownerRef === comment.ownerRef);
386382
}
387383

388-
nextQuestion(): void {
389-
this.changeQuestion(1);
390-
}
391-
392-
previousQuestion(): void {
393-
this.changeQuestion(-1);
394-
}
395-
396384
activateQuestion(questionDoc: QuestionDoc, actionSource?: QuestionChangeActionSource, clearFilter?: boolean): void {
397385
const verseRef: VerseRefData | undefined = questionDoc.data?.verseRef;
398386

@@ -444,12 +432,6 @@ export class CheckingQuestionsComponent implements OnInit, OnChanges {
444432
?.nativeElement.scrollIntoView({ block: 'nearest' });
445433
}
446434

447-
private changeQuestion(newDifferential: number): void {
448-
if (this.activeQuestionDoc && this.checkCanChangeQuestion(newDifferential)) {
449-
this.activateQuestion(this.questionDocs[this.activeQuestionIndex + newDifferential]);
450-
}
451-
}
452-
453435
private referenceForDisplay(questionDoc: QuestionDoc): string {
454436
const verseRefData: VerseRefData | undefined = questionDoc?.data?.verseRef;
455437
return verseRefData ? this.i18n.localizeReference(toVerseRef(verseRefData)) : '';

src/SIL.XForge.Scripture/ClientApp/src/app/connect-project/connect-project.component.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ export class ConnectProjectComponent extends DataLoadingComponent implements OnI
8686
return this.projectsFromParatext == null || !this.isAppOnline;
8787
}
8888

89-
get isBasedOnProjectSet(): boolean {
90-
return this.settings.controls.sourceParatextId.value != null;
91-
}
92-
9389
get projects(): ParatextProject[] {
9490
return this.projectsFromParatext ?? [];
9591
}
@@ -127,10 +123,6 @@ export class ConnectProjectComponent extends DataLoadingComponent implements OnI
127123
});
128124
}
129125

130-
logInWithParatext(): void {
131-
this.paratextService.linkParatext('/connect-project');
132-
}
133-
134126
async submit(): Promise<void> {
135127
if (!this.connectProjectForm.valid || this.projectsFromParatext == null) {
136128
return;

src/SIL.XForge.Scripture/ClientApp/src/app/my-projects/my-projects.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ export class MyProjectsComponent implements OnInit {
9696
if (this.userIsPTUser) await this.loadParatextProjects();
9797
}
9898

99-
currentUserRole(projectId: string): string | undefined {
100-
return this.userConnectedProjects.find(project => project.id === projectId)?.data?.userRoles[this.user!.id];
101-
}
102-
10399
isLastSelectedProject(project: SFProjectProfileDoc): boolean {
104100
return project.id === this.user?.data?.sites[environment.siteId].currentProjectId;
105101
}

src/SIL.XForge.Scripture/ClientApp/src/app/permissions-viewer/permissions-viewer.component.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ export class PermissionsViewerComponent implements OnInit {
9090
return this.permissionsMatrix[role]?.[domain] || [];
9191
}
9292

93-
/** Check if a specific role has a specific permission for a domain */
94-
hasOperation(role: string, domain: string, operation: string): boolean {
95-
const operations = this.getOperationsForRoleDomain(role, domain);
96-
return operations.includes(operation) === true;
97-
}
98-
9993
/** Sort operations according to a predefined logical order */
10094
private sortOperations(operations: string[]): string[] {
10195
if (operations === undefined || operations.length === 0) {

src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-project.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ export class ServalProjectComponent extends DataLoadingComponent implements OnIn
107107
return ['/projects', this.activatedProjectService.projectId!, 'event-log'];
108108
}
109109

110-
get draftSourcesLink(): string[] {
111-
return ['/projects', this.activatedProjectService.projectId!, 'draft-generation', 'sources'];
112-
}
113-
114110
get isOnline(): boolean {
115111
return this.onlineStatusService.isOnline;
116112
}

src/SIL.XForge.Scripture/ClientApp/src/app/translate/biblical-terms/biblical-terms.component.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -287,19 +287,6 @@ export class BiblicalTermsComponent extends DataLoadingComponent implements OnDe
287287
this.projectUserConfigDoc?.submitJson0Op(op => op.set<boolean>(puc => puc.transliterateBiblicalTerms, value));
288288
}
289289

290-
get selectedReferenceForCaption(): string {
291-
if ((this._bookNum ?? 0) === 0) {
292-
return '';
293-
} else if ((this._chapter ?? 0) === 0) {
294-
return ` (${this.i18n.localizeBook(this._bookNum ?? 0)})`;
295-
} else if ((this._verse ?? '0') === '0') {
296-
return ` (${this.i18n.localizeBook(this._bookNum ?? 0)} ${this._chapter})`;
297-
} else {
298-
const verseRef = new VerseRef(Canon.bookNumberToId(this._bookNum!), this._chapter!.toString(), this._verse!);
299-
return ` (${this.i18n.localizeReference(verseRef)})`;
300-
}
301-
}
302-
303290
ngOnDestroy(): void {
304291
this.biblicalTermQuery?.dispose();
305292
this.noteThreadQuery?.dispose();

src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-generation.component.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import { OnlineStatusService } from 'xforge-common/online-status.service';
2525
import { UICommonModule } from 'xforge-common/ui-common.module';
2626
import { filterNullish, quietTakeUntilDestroyed } from 'xforge-common/util/rxjs-util';
2727
import { issuesEmailTemplate } from 'xforge-common/utils';
28-
import { environment } from '../../../environments/environment';
2928
import { SFProjectProfileDoc } from '../../core/models/sf-project-profile-doc';
3029
import { SelectableProject } from '../../core/paratext.service';
3130
import { SFProjectService } from '../../core/sf-project.service';
@@ -128,10 +127,6 @@ export class DraftGenerationComponent extends DataLoadingComponent implements On
128127
return this.isBackTranslation || this.isPreTranslationApproved;
129128
}
130129

131-
get issueEmail(): string {
132-
return environment.issueEmail;
133-
}
134-
135130
constructor(
136131
private readonly route: ActivatedRoute,
137132
private readonly router: Router,

src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-sources/draft-sources.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,6 @@ export class DraftSourcesComponent extends DataLoadingComponent implements Confi
232232
return value ? `(${value})` : '';
233233
}
234234

235-
get targetLanguageTag(): string {
236-
return this.trainingTargets[0]!.writingSystem.tag;
237-
}
238-
239235
onTrainingDataSelect(newTrainingFiles: TrainingData[]): void {
240236
this.availableTrainingFiles = newTrainingFiles;
241237
this.changesMade = true;

0 commit comments

Comments
 (0)