Skip to content

Commit

Permalink
Add refresh notice
Browse files Browse the repository at this point in the history
  • Loading branch information
ms3056 committed Jul 12, 2023
1 parent 10bdd10 commit 1ccd35f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,9 @@ export default class CryptoPlugin extends Plugin {
if (this.view) {
this.view.displayCryptoData();
this.clearUpdateInterval();
this.updateInterval = setInterval(
() => this.view.displayCryptoData(),
this.settings.refreshInterval * 1000
);
this.updateInterval = setInterval(() => {
this.view.displayCryptoData();
}, this.settings.refreshInterval * 1000);
}
}
}
Expand Down Expand Up @@ -200,7 +199,7 @@ class CryptoView extends ItemView {

cryptoDataArray.push(cryptoData);
}

new Notice("Crypto data refreshed");
return cryptoDataArray;
} catch (error) {
console.error("Failed to fetch crypto data", error);
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "crypto",
"name": "Crypto",
"version": "0.2.1",
"version": "0.2.2",
"minAppVersion": "0.15.0",
"description": "This is a simple crypto currency display.",
"author": "HiroMike",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crypto",
"version": "0.2.1",
"version": "0.2.2",
"description": "This is a simple crypto currency display.",
"main": "main.js",
"scripts": {
Expand Down

0 comments on commit 1ccd35f

Please sign in to comment.