Skip to content

Commit

Permalink
only show new if license has been confirmed
Browse files Browse the repository at this point in the history
- closes #2133
  • Loading branch information
foxriver76 committed Sep 27, 2023
1 parent bafc408 commit c696f8b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ class App extends Router {
`admin.${instance}.info.newsFeed`,
this.getNews(instance),
)),
5000,
5_000,
);

setTimeout(
Expand Down Expand Up @@ -1210,7 +1210,7 @@ class App extends Router {
for (let instance = 0; instance < maxCount; instance++) {
try {
const adminAlive = await this.socket.getState(`system.adapter.admin.${instance}.alive`);
if (adminAlive && adminAlive.val) {
if (adminAlive?.val) {
resolve(instance);
break;
}
Expand Down Expand Up @@ -1260,6 +1260,10 @@ class App extends Router {
*/
getNews = instance => async (name, newsFeed) => {
try {
if (!this.state.systemConfig.common.licenseConfirmed) {
return;
}

const lastNewsId = await this.socket.getState(`admin.${instance}.info.newsLastId`);
if (newsFeed?.val) {
let news = null;
Expand Down

0 comments on commit c696f8b

Please sign in to comment.