You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
Tools: Add class member accessibility modifiers and converted rule @typescript-eslint/explicit-member-accessibility to an error
This commit is contained in:
@ -32,17 +32,17 @@ export default class RevisionService extends BaseService {
|
||||
private isCollecting_ = false;
|
||||
public isRunningInBackground_ = false;
|
||||
|
||||
static instance() {
|
||||
public static instance() {
|
||||
if (this.instance_) return this.instance_;
|
||||
this.instance_ = new RevisionService();
|
||||
return this.instance_;
|
||||
}
|
||||
|
||||
oldNoteCutOffDate_() {
|
||||
public oldNoteCutOffDate_() {
|
||||
return Date.now() - Setting.value('revisionService.oldNoteInterval');
|
||||
}
|
||||
|
||||
async isOldNote(noteId: string) {
|
||||
public async isOldNote(noteId: string) {
|
||||
if (noteId in this.isOldNotesCache_) return this.isOldNotesCache_[noteId];
|
||||
|
||||
const isOld = await Note.noteIsOlderThan(noteId, this.oldNoteCutOffDate_());
|
||||
@ -50,7 +50,7 @@ export default class RevisionService extends BaseService {
|
||||
return isOld;
|
||||
}
|
||||
|
||||
noteMetadata_(note: NoteEntity) {
|
||||
private noteMetadata_(note: NoteEntity) {
|
||||
const excludedFields = ['type_', 'title', 'body', 'created_time', 'updated_time', 'encryption_applied', 'encryption_cipher_text', 'is_conflict'];
|
||||
const md: any = {};
|
||||
for (const k in note) {
|
||||
@ -214,7 +214,7 @@ export default class RevisionService extends BaseService {
|
||||
logger.info(`collectRevisions: Created revisions for ${doneNoteIds.length} notes`);
|
||||
}
|
||||
|
||||
async deleteOldRevisions(ttl: number) {
|
||||
public async deleteOldRevisions(ttl: number) {
|
||||
return Revision.deleteOldRevisions(ttl);
|
||||
}
|
||||
|
||||
@ -239,11 +239,11 @@ export default class RevisionService extends BaseService {
|
||||
return output;
|
||||
}
|
||||
|
||||
restoreFolderTitle() {
|
||||
public restoreFolderTitle() {
|
||||
return _('Restored Notes');
|
||||
}
|
||||
|
||||
async restoreFolder() {
|
||||
public async restoreFolder() {
|
||||
let folder = await Folder.loadByTitle(this.restoreFolderTitle());
|
||||
if (!folder) {
|
||||
folder = await Folder.save({ title: this.restoreFolderTitle() });
|
||||
@ -267,7 +267,7 @@ export default class RevisionService extends BaseService {
|
||||
return _('The note "%s" has been successfully restored to the notebook "%s".', substrWithEllipsis(note.title, 0, 32), this.restoreFolderTitle());
|
||||
}
|
||||
|
||||
async importRevisionNote(note: NoteEntity): Promise<NoteEntity> {
|
||||
public async importRevisionNote(note: NoteEntity): Promise<NoteEntity> {
|
||||
const toImport = Object.assign({}, note);
|
||||
delete toImport.id;
|
||||
delete toImport.updated_time;
|
||||
@ -282,7 +282,7 @@ export default class RevisionService extends BaseService {
|
||||
return Note.save(toImport);
|
||||
}
|
||||
|
||||
async maintenance() {
|
||||
public async maintenance() {
|
||||
this.maintenanceCalls_.push(true);
|
||||
try {
|
||||
const startTime = Date.now();
|
||||
@ -308,7 +308,7 @@ export default class RevisionService extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
runInBackground(collectRevisionInterval: number = null) {
|
||||
public runInBackground(collectRevisionInterval: number = null) {
|
||||
if (this.isRunningInBackground_) return;
|
||||
this.isRunningInBackground_ = true;
|
||||
|
||||
@ -325,7 +325,7 @@ export default class RevisionService extends BaseService {
|
||||
}, collectRevisionInterval);
|
||||
}
|
||||
|
||||
async cancelTimers() {
|
||||
public async cancelTimers() {
|
||||
if (this.maintenanceTimer1_) {
|
||||
shim.clearTimeout(this.maintenanceTimer1_);
|
||||
this.maintenanceTimer1_ = null;
|
||||
|
Reference in New Issue
Block a user