disable search onChange & fix recent workspace
This commit is contained in:
1 parent
1240547930
commit
00b08988ca
3 files changed
+14
-8
No files matched your search
@@ -109,9 +109,15 @@ export default class Settings {
|
||||
}
|
||||
|
||||
pushRecentWorkspace(path: string) {
|
||||
if (this.model.recentWorkspaces.indexOf(path) < 0) {
|
||||
this.model.recentWorkspaces.unshift(path);
|
||||
this.save();
|
||||
var list = this.model.recentWorkspaces;
|
||||
if (list.indexOf(path) >= 0) {
|
||||
list = list.filter((value) => value !== path);
|
||||
}
|
||||
list.unshift(path);
|
||||
while(list.length > 10) {
|
||||
list.pop();
|
||||
}
|
||||
this.model.recentWorkspaces = list;
|
||||
this.save();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user