Final changes before full v1 release

- Updated deps
- Create title if a post is missing one

Reviewed-on: #27
This commit was merged in pull request #27.
This commit is contained in:
2024-11-22 01:57:49 +00:00
parent d06249aecd
commit a0b2d2986a
6 changed files with 26 additions and 24 deletions

View File

@@ -152,7 +152,8 @@ class ItemList
echo '<article>';
if ($this->dbList->hasItems()) {
$this->dbList->iter(function (ItemWithFeed $item) use ($return) {
echo '<p>' . hx_get("/item?id=$item->id$return", strip_tags($item->title)) . '<br><small>';
$title = trim($item->title) === '' ? '<em>no title</em>' : strip_tags($item->title);
echo '<p>' . hx_get("/item?id=$item->id$return", $title) . '<br><small>';
if ($this->showIndicators) {
if (!$item->isRead()) echo '<strong>Unread</strong> &nbsp; ';
if ($item->isBookmarked()) echo '<strong>Bookmarked</strong> &nbsp; ';