Skip to content

Commit 605795a

Browse files
committed
Reverse history list order
1 parent 9fb0a3a commit 605795a

File tree

5 files changed

+3
-17
lines changed

5 files changed

+3
-17
lines changed

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
"onView:mdTreeItems",
1717
"onCommand:HackMD.login",
1818
"onCommand:HackMD.logout",
19-
"onCommand:HackMD.createActiveEditorContentToHackMD",
20-
"onCommand:HackMD.createCodeSnippet"
19+
"onCommand:HackMD.createActiveEditorContentToHackMD"
2120
],
2221
"license": "MIT",
2322
"homepage": "https://github.com/hackmdio/vscode-hackmd/blob/master/README.md",
@@ -107,10 +106,6 @@
107106
{
108107
"command": "HackMD.createActiveEditorContentToHackMD",
109108
"title": "HackMD: Create Active Editor Content To HackMD"
110-
},
111-
{
112-
"command": "HackMD.createCodeSnippet",
113-
"title": "HackMD: Create a code snippet"
114109
}
115110
],
116111
"menus": {

src/commands/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ import * as vscode from 'vscode';
22
import { registerUserCommands } from './user'
33
import { registerTreeViewCommands } from './treeView'
44
import { registerNoteCommands } from './note';
5-
import { registerSnippetCommands } from './snippet'
65
import { Store } from '../store';
76

87
export function registerCommand(context: vscode.ExtensionContext, store: Store) {
98
registerUserCommands(context, store);
109
registerTreeViewCommands(context, store);
1110
registerNoteCommands(context);
12-
registerSnippetCommands(context);
1311
}

src/commands/snippet.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/commands/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as vscode from 'vscode'
1+
import * as vscode from 'vscode';
22
import { checkLogin, login, refreshHistoryList } from './../utils'
33
import { Store } from '../store';
44
import * as apiClient from '@hackmd/api';

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as apiClient from '@hackmd/api';
55
const API = new apiClient.default();
66
export const refreshHistoryList = async (context) => {
77
if (await checkLogin()) {
8-
store.history = (await API.getHistory()).history;
8+
store.history = (await API.getHistory()).history.reverse();
99
} else {
1010
store.history = [{}];
1111
}

0 commit comments

Comments
 (0)