Skip to content

Commit 347b88c

Browse files
committed
fix: typescript and linter issues
1 parent ccb358c commit 347b88c

File tree

8 files changed

+35
-23
lines changed

8 files changed

+35
-23
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,11 @@ If you encounter any issues or have suggestions:
193193

194194
If you find this plugin useful, consider supporting its long-term development:
195195

196-
<a href="https://www.buymeacoffee.com/amatya_aditya"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a pizza&emoji=🍕&slug=amatya_aditya&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff" /></a>
196+
<p align="center">
197+
<a href="https://www.buymeacoffee.com/amatya_aditya" target="_blank">☕ Buy me a coffee</a>
198+
</p>
199+
200+
<p align="center"> <a href='https://ko-fi.com/Y8Y41FV4WI' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi2.png?v=6' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a></p>
197201

198202
## Other Plugins by Me
199203

docs/releases/2.1.5.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# 2.1.5
2+
3+
## Fixes
4+
- Fixed multiple TypeScript linter errors related to unnecessary `await` expressions
5+
- Improved async method handling across dashboard and reader views
6+
- Enhanced type safety for file existence checks
7+
- Resolved unsafe type assignments in settings and view components

main.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default class RssDashboardPlugin extends Plugin {
8484

8585
const view = await this.getActiveDashboardView();
8686
if (view) {
87-
await view.render();
87+
view.render();
8888
}
8989

9090
try {
@@ -194,7 +194,7 @@ export default class RssDashboardPlugin extends Plugin {
194194
if (view) {
195195
this.settings.sidebarCollapsed = !this.settings.sidebarCollapsed;
196196
await this.saveSettings();
197-
await view.render();
197+
view.render();
198198
}
199199
},
200200
});
@@ -377,7 +377,7 @@ export default class RssDashboardPlugin extends Plugin {
377377
await this.saveSettings();
378378
const view = await this.getActiveDashboardView();
379379
if (view) {
380-
await view.refresh();
380+
view.refresh();
381381
new Notice(`Feeds refreshed: ${feedNoticeText}`);
382382
}
383383
} catch (error) {
@@ -436,7 +436,7 @@ export default class RssDashboardPlugin extends Plugin {
436436
await this.saveSettings();
437437
const view = await this.getActiveDashboardView();
438438
if (view) {
439-
await view.refresh();
439+
view.refresh();
440440
}
441441

442442
if (updatedCount > 0) {
@@ -490,7 +490,7 @@ export default class RssDashboardPlugin extends Plugin {
490490

491491
const view = await this.getActiveDashboardView();
492492
if (view) {
493-
await view.refresh();
493+
view.refresh();
494494
}
495495
}
496496

@@ -607,7 +607,7 @@ export default class RssDashboardPlugin extends Plugin {
607607

608608
const view = await this.getActiveDashboardView();
609609
if (view) {
610-
await view.render();
610+
view.render();
611611
}
612612

613613
new Notice(`Imported ${addedFeeds.length} feeds. Articles will be fetched in the background.`);
@@ -704,7 +704,7 @@ export default class RssDashboardPlugin extends Plugin {
704704

705705
const view = await this.getActiveDashboardView();
706706
if (view && processedCount % 3 === 0) {
707-
await view.render();
707+
view.render();
708708
}
709709

710710

@@ -715,7 +715,7 @@ export default class RssDashboardPlugin extends Plugin {
715715
await this.saveSettings();
716716
const view = await this.getActiveDashboardView();
717717
if (view) {
718-
await view.render();
718+
view.render();
719719
}
720720

721721

@@ -1040,7 +1040,7 @@ export default class RssDashboardPlugin extends Plugin {
10401040

10411041
const view = await this.getActiveDashboardView();
10421042
if (view) {
1043-
await view.render();
1043+
view.render();
10441044
}
10451045
}
10461046
}

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "rss-dashboard",
33
"name": "RSS Dashboard",
4-
"version": "2.1.4",
4+
"version": "2.1.5",
55
"minAppVersion": "1.1.0",
66
"description": "A Dashboard for organizing and consuming RSS feeds, YouTube channels, and podcasts with smart tagging, media playback, and seamless content flow.",
77
"author": "Aditya Amatya",

src/settings/settings-tab.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export class RssDashboardSettingTab extends PluginSettingTab {
8080
const view = await this.plugin.getActiveDashboardView();
8181
if (view) {
8282
await this.app.workspace.revealLeaf(view.leaf);
83-
await view.render();
83+
view.render();
8484
}
8585
})
8686
);
@@ -155,7 +155,7 @@ export class RssDashboardSettingTab extends PluginSettingTab {
155155
const view = await this.plugin.getActiveDashboardView();
156156
if (view) {
157157
await this.app.workspace.revealLeaf(view.leaf);
158-
await view.render();
158+
view.render();
159159
}
160160
})
161161
);
@@ -257,7 +257,7 @@ export class RssDashboardSettingTab extends PluginSettingTab {
257257
const view = await this.plugin.getActiveDashboardView();
258258
if (view && this.plugin.settings.viewStyle === "card") {
259259
await this.app.workspace.revealLeaf(view.leaf);
260-
await view.render();
260+
view.render();
261261
}
262262
})
263263
);
@@ -604,7 +604,7 @@ export class RssDashboardSettingTab extends PluginSettingTab {
604604
const view = await this.plugin.getActiveDashboardView();
605605
if (view) {
606606
await this.app.workspace.revealLeaf(view.leaf);
607-
await view.render();
607+
view.render();
608608
}
609609
new Notice("Data imported successfully!");
610610
} catch {
@@ -651,7 +651,7 @@ export class RssDashboardSettingTab extends PluginSettingTab {
651651
const view = await this.plugin.getActiveDashboardView();
652652
if (view) {
653653
await this.app.workspace.revealLeaf(view.leaf);
654-
await view.render();
654+
view.render();
655655
}
656656
})
657657
)

src/views/dashboard-view.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ export class RssDashboardView extends ItemView {
153153
}
154154

155155

156-
await this.render();
156+
this.render();
157157
}
158158

159159

160-
async render(): Promise<void> {
160+
render(): void {
161161

162162
this.verifySavedArticles();
163163

@@ -914,8 +914,8 @@ export class RssDashboardView extends ItemView {
914914
}
915915

916916

917-
async refresh(): Promise<void> {
918-
await this.render();
917+
refresh(): void {
918+
this.render();
919919
}
920920

921921
onClose(): Promise<void> {

src/views/reader-view.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export class ReaderView extends ItemView {
274274
this.updateSavedLabel(false);
275275

276276
if (item.saved) {
277-
const fileExists = await this.checkSavedFileExists(item);
277+
const fileExists = this.checkSavedFileExists(item);
278278
if (!fileExists) {
279279
item.saved = false;
280280
if (item.tags) {
@@ -751,7 +751,7 @@ export class ReaderView extends ItemView {
751751
}
752752

753753

754-
private async checkSavedFileExists(item: FeedItem): Promise<boolean> {
754+
private checkSavedFileExists(item: FeedItem): boolean {
755755
try {
756756

757757
const folder = this.settings.articleSaving.defaultFolder || "RSS articles";

versions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
"2.1.1": "1.1.0",
1414
"2.1.2": "1.1.0",
1515
"2.1.3": "1.1.0",
16-
"2.1.4": "1.1.0"
16+
"2.1.4": "1.1.0",
17+
"2.1.5": "1.1.0"
1718
}

0 commit comments

Comments
 (0)