From 9d02f85dfaf18513531f17e0941f7fedbe36aef5 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Thu, 14 Feb 2019 18:41:49 +0100 Subject: [PATCH] Finally fixed the news check. --- .../Api/Controllers/News/NewsController.cs | 6 ++-- .../Areas/Api/Views/Shared/Docs.cshtml | 2 +- .../apps/pages/apps-page.component.ts | 30 +++++++++---------- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/Squidex/Areas/Api/Controllers/News/NewsController.cs b/src/Squidex/Areas/Api/Controllers/News/NewsController.cs index 9a5b3b06b..e80dc19b7 100644 --- a/src/Squidex/Areas/Api/Controllers/News/NewsController.cs +++ b/src/Squidex/Areas/Api/Controllers/News/NewsController.cs @@ -17,10 +17,10 @@ namespace Squidex.Areas.Api.Controllers.News /// /// Readonly API for news items. /// - [ApiExplorerSettings(GroupName = nameof(Languages))] + [ApiExplorerSettings(GroupName = nameof(News))] public sealed class NewsController : ApiController { - private FeaturesService featuresService; + private readonly FeaturesService featuresService; public NewsController(ICommandBus commandBus, FeaturesService featuresService) : base(commandBus) @@ -29,7 +29,7 @@ namespace Squidex.Areas.Api.Controllers.News } /// - /// Get all features since latest version. + /// Get features since version. /// /// The latest received version. /// diff --git a/src/Squidex/Areas/Api/Views/Shared/Docs.cshtml b/src/Squidex/Areas/Api/Views/Shared/Docs.cshtml index 8e733da57..b32732b73 100644 --- a/src/Squidex/Areas/Api/Views/Shared/Docs.cshtml +++ b/src/Squidex/Areas/Api/Views/Shared/Docs.cshtml @@ -19,6 +19,6 @@ - + \ No newline at end of file diff --git a/src/Squidex/app/features/apps/pages/apps-page.component.ts b/src/Squidex/app/features/apps/pages/apps-page.component.ts index b8dbd8a16..08385fe98 100644 --- a/src/Squidex/app/features/apps/pages/apps-page.component.ts +++ b/src/Squidex/app/features/apps/pages/apps-page.component.ts @@ -49,24 +49,22 @@ export class AppsPageComponent implements OnInit { if (shouldShowOnboarding && apps.length === 0) { this.onboardingService.disable('dialog'); this.onboardingDialog.show(); - } - }); - - if (!shouldShowOnboarding) { - const newsVersion = this.localStore.getInt('squidex.news.version'); + } else { + const newsVersion = this.localStore.getInt('squidex.news.version'); - this.newsService.getFeatures(newsVersion) - .subscribe(result => { - if (result.version !== newsVersion) { - if (result.features.length > 0) { - this.newsFeatures = result.features; - this.newsDialog.show(); - } + this.newsService.getFeatures(newsVersion) + .subscribe(result => { + if (result.version !== newsVersion) { + if (result.features.length > 0) { + this.newsFeatures = result.features; + this.newsDialog.show(); + } - this.localStore.setInt('squidex.news.version', result.version); - } - }); - } + this.localStore.setInt('squidex.news.version', result.version); + } + }); + } + }); } public createNewApp(template: string) {