@@ -2,7 +2,7 @@ import * as vscode from 'vscode';
2
2
import { HackMDTreeViewProvider } from './../tree/index' ;
3
3
import { NoteTreeNode } from './../tree/nodes' ;
4
4
import { MdTextDocumentContentProvider } from './../mdTextDocument' ;
5
- import { refreshHistoryList , refreshLoginStatus , refreshLoginCredential , getLoginCredential } from './../utils' ;
5
+ import { refreshHistoryList , refreshLoginStatus , refreshLoginCredential } from './../utils' ;
6
6
import { API , ExportType } from './../api' ;
7
7
8
8
export async function registerTreeViewCommands ( context : vscode . ExtensionContext ) {
@@ -25,8 +25,7 @@ export async function registerTreeViewCommands(context: vscode.ExtensionContext)
25
25
}
26
26
} ) ) ;
27
27
28
- context . subscriptions . push ( vscode . commands . registerCommand ( 'note.showPreview' , async ( node : NoteTreeNode ) => {
29
- const noteNode = node ;
28
+ context . subscriptions . push ( vscode . commands . registerCommand ( 'note.showPreview' , async ( noteNode : NoteTreeNode ) => {
30
29
if ( noteNode . label && noteNode . noteId ) {
31
30
const content = await API . exportString ( noteNode . noteId , ExportType . MD ) ;
32
31
if ( content ) {
@@ -36,8 +35,7 @@ export async function registerTreeViewCommands(context: vscode.ExtensionContext)
36
35
}
37
36
} ) ) ;
38
37
39
- context . subscriptions . push ( vscode . commands . registerCommand ( 'note.showPreviewAndEditor' , async ( node : NoteTreeNode ) => {
40
- const noteNode = node ;
38
+ context . subscriptions . push ( vscode . commands . registerCommand ( 'note.showPreviewAndEditor' , async ( noteNode : NoteTreeNode ) => {
41
39
if ( noteNode . label && noteNode . noteId ) {
42
40
const content = await API . exportString ( noteNode . noteId , ExportType . MD ) ;
43
41
if ( content ) {
0 commit comments