Skip to content

Commit ef6a6c6

Browse files
committed
[fix] news notification doesn't disappear bug
1 parent 3458523 commit ef6a6c6

File tree

7 files changed

+154
-5
lines changed

7 files changed

+154
-5
lines changed

.idea/codeception.xml

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/leantime-oss.iml

+71
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/php.xml

+67
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/phpspec.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/Domain/Menu/Repositories/Menu.php

-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ class Menu
124124
5 => ['type' => 'item', 'module' => 'plugins', 'title' => 'menu.leantime_apps', 'icon' => 'fa fa-fw fa-puzzle-piece', 'tooltip' => 'menu.leantime_apps_tooltip', 'href' => '/plugins/marketplace', 'active' => ['marketplace', 'myapps']],
125125
10 => ['type' => 'item', 'module' => 'connector', 'title' => 'menu.integrations', 'icon' => 'fa fa-fw fa-circle-nodes', 'tooltip' => 'menu.connector_tooltip', 'href' => '/connector/show', 'active' => ['show']],
126126
15 => ['type' => 'item', 'module' => 'setting', 'title' => 'menu.company_settings', 'icon' => 'fa fa-fw fa-cogs', 'tooltip' => 'menu.company_settings_tooltip', 'href' => '/setting/editCompanySettings', 'active' => ['editCompanySettings']],
127-
128127
20 => ['type' => 'item', 'module' => 'notes', 'title' => 'menu.customfields_premium', 'icon' => 'fa fa-solid fa-list', 'tooltip' => 'Custom Fields', 'href' => '/plugins/marketplace#/plugins/details/leantime_customfields', 'role' => 'editor'],
129128

130129
],

app/Domain/Notifications/Services/News.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public function getLatest(int $userId): false|\SimpleXMLElement
5151

5252
$rss = $this->getFeed();
5353

54-
$latestGuid = $rss?->channel?->item[0]?->guid;
55-
$this->settingService->saveSetting("usersettings.".$userId.".lastNewsGuid", $latestGuid);
54+
$latestGuid = strval($rss?->channel?->item[0]?->guid);
55+
$this->settingService->saveSetting("usersettings.".$userId.".lastNewsGuid", strval($latestGuid));
5656

5757
//Todo: check last article the user read
5858
//Only load rss feed once a day
@@ -65,7 +65,7 @@ public function hasNews(int $userId): bool
6565

6666
$rss = $this->getFeed();
6767

68-
$latestGuid = $rss?->channel?->item[0]?->guid;
68+
$latestGuid = strval($rss?->channel?->item[0]?->guid);
6969

7070
$lastNewsGuid = $this->settingService->getSetting("usersettings.".$userId.".lastNewsGuid");
7171

app/Plugins

0 commit comments

Comments
 (0)