Skip to content

Commit

Permalink
~ use the correct path for new file creation
Browse files Browse the repository at this point in the history
~ adress issues from linting
  • Loading branch information
joethei committed Nov 18, 2021
1 parent e964b84 commit 5cf5fa6
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 18 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "rss-reader",
"name": "RSS Reader",
"version": "0.6.0",
"version": "0.6.1",
"minAppVersion": "0.9.12",
"description": "Read RSS Feeds from within obsidian",
"author": "Johannes Theiner",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rss-reader",
"version": "0.6.0",
"version": "0.6.1",
"description": "Read RSS Feeds from inside obsidian",
"main": "main.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/actions/Action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export default class Action {
static PASTE = new Action("paste to current note", "paste", (plugin, item) : Promise<void> => {
return pasteToNote(plugin, item);
});
static COPY = new Action("copy to clipboard", "feather-clipboard", ((plugin, item) : Promise<void> => {
static COPY = new Action("copy to clipboard", "feather-clipboard", ((_, item) : Promise<void> => {
return copy(htmlToMarkdown(item.content));
}));
static OPEN = new Action("open in browser", "open-elsewhere-glyph", ((plugin, item) : Promise<void> => {
static OPEN = new Action("open in browser", "open-elsewhere-glyph", ((_, item) : Promise<void> => {
openInBrowser(item);
return Promise.resolve();
}));
Expand Down
2 changes: 1 addition & 1 deletion src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {RssReaderSettings} from "./settings/settings";

export async function createNewNote(plugin: RssReaderPlugin, item: RssFeedItem) : Promise<void> {
const activeFile = plugin.app.workspace.getActiveFile();
let dir = plugin.app.fileManager.getNewFileParent(activeFile ? activeFile.path : "").name;
let dir = plugin.app.fileManager.getNewFileParent(activeFile ? activeFile.path : "").path;

if(plugin.settings.saveLocation === "custom") {
dir = plugin.settings.saveLocationFolder;
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default class RssReaderPlugin extends Plugin {
}

filterItems(items: RssFeedItem[]) {
let filtered = new Array<FilteredFolderContent>();
const filtered = new Array<FilteredFolderContent>();
for (const filter of this.settings.filtered) {
// @ts-ignore
const filterType = FilterType[filter.filterType];
Expand Down
2 changes: 1 addition & 1 deletion src/modals/FilteredFolderModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface FilteredFolder{
export class FilteredFolderModal extends BaseModal {
name: string;
filterType: string;
filterContent: string = "";
filterContent = "";
sortOrder: string;

saved = false;
Expand Down
10 changes: 0 additions & 10 deletions src/modals/ItemModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {RssFeedItem} from "../parser/rssParser";
import RssReaderPlugin from "../main";
import {sanitizeHTMLToDom} from "../consts";
import Action from "../actions/Action";
import tag from "svelte/types/compiler/parse/state/tag";

export class ItemModal extends Modal {

Expand All @@ -21,15 +20,6 @@ export class ItemModal extends Modal {
item.read = true;

const items = this.plugin.settings.items;
/*for (const content of Object.values(items)) {
content.items.forEach((item) => {
if(this.item == item) {
content.items.remove(item);
content.items.push(this.item);
}
});
}*/

this.plugin.writeFeedContent(() => {
return items;
});
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"0.3.1": "0.9.12",
"0.4.0": "0.9.12",
"0.5.0": "0.9.12",
"0.6.0": "0.9.12"
"0.6.0": "0.9.12",
"0.6.1": "0.9.12"
}

0 comments on commit 5cf5fa6

Please sign in to comment.