mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	refactor: 💡 refactor serval event names
refactore serval event names to follow the current usage in repo
This commit is contained in:
		
							parent
							
								
									a9d8d7d3c5
								
							
						
					
					
						commit
						c9c18146f4
					
				@ -303,9 +303,6 @@ type EventMappings = {
 | 
			
		||||
    setNoteContext: {
 | 
			
		||||
        noteContext: NoteContext;
 | 
			
		||||
    };
 | 
			
		||||
    noteTypeMimeChangedEvent: {
 | 
			
		||||
        noteId: string;
 | 
			
		||||
    };
 | 
			
		||||
    reEvaluateHighlightsListWidgetVisibility: {
 | 
			
		||||
        noteId: string | undefined;
 | 
			
		||||
    };
 | 
			
		||||
@ -333,7 +330,7 @@ type EventMappings = {
 | 
			
		||||
    noteDetailRefreshed: {
 | 
			
		||||
        ntxId?: string | null;
 | 
			
		||||
    };
 | 
			
		||||
    noteContextReorderEvent: {
 | 
			
		||||
    noteContextReorder: {
 | 
			
		||||
        oldMainNtxId: string;
 | 
			
		||||
        newMainNtxId: string;
 | 
			
		||||
        ntxIdsInOrder: string[];
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,7 @@ export default class ClosePaneButton extends OnClickButtonWidget {
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    async noteContextReorderEvent({ ntxIdsInOrder }: EventData<"noteContextReorderEvent">) {
 | 
			
		||||
    async noteContextReorderEvent({ ntxIdsInOrder }: EventData<"noteContextReorder">) {
 | 
			
		||||
        this.refresh();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -85,7 +85,7 @@ export default class CodeButtonsWidget extends NoteContextAwareWidget {
 | 
			
		||||
        this.$openTriliumApiDocsButton.toggle(note.mime.startsWith("application/javascript;env="));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    async noteTypeMimeChangedEvent({ noteId }: EventData<"noteTypeMimeChangedEvent">) {
 | 
			
		||||
    async noteTypeMimeChangedEvent({ noteId }: EventData<"noteTypeMimeChanged">) {
 | 
			
		||||
        if (this.isNote(noteId)) {
 | 
			
		||||
            await this.refresh();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@ -119,7 +119,7 @@ class NoteContextAwareWidget extends BasicWidget {
 | 
			
		||||
        this.noteContext = noteContext;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    async noteTypeMimeChangedEvent({ noteId }: EventData<"noteTypeMimeChangedEvent">) {
 | 
			
		||||
    async noteTypeMimeChangedEvent({ noteId }: EventData<"noteTypeMimeChanged">) {
 | 
			
		||||
        if (this.isNote(noteId)) {
 | 
			
		||||
            await this.refresh();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@ -638,7 +638,7 @@ export default class TabRowWidget extends BasicWidget {
 | 
			
		||||
        this.updateTabById(noteContext.mainNtxId || noteContext.ntxId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    noteContextReorderEvent({ oldMainNtxId, newMainNtxId }: EventData<"noteContextReorderEvent">) {
 | 
			
		||||
    noteContextReorderEvent({ oldMainNtxId, newMainNtxId }: EventData<"noteContextReorder">) {
 | 
			
		||||
        if (!oldMainNtxId || !newMainNtxId) {
 | 
			
		||||
            // no need to update tab row
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user