Show exported inbox records newest first

The exported folder is an archive: with the limit of 300 records the oldest
of the newest 300 used to appear at the top. The working folders keep their
oldest-first order.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
admin.juergenandClaude Fable 5.1 committed 2026-10-27 20:08:09 +01:00
1 parent 3aad6aa559
commit 11f1ab3d2b
2 files changed
+13 -1

No files matched your search

+5 -1
View File
@@ -20,7 +20,7 @@ class InboxRepository
}
/**
* @return list<InboxItem> älteste zuerst
* @return list<InboxItem> älteste zuerst; im Ordner „Exportiert“ neueste zuerst (siehe InboxState::newestFirst())
*/
public function findByState(InboxState $state, int $limit = 0): array
{
@@ -55,6 +55,10 @@ class InboxRepository
$items = \array_slice($items, -$limit);
}
if ($state->newestFirst()) {
$items = array_reverse($items);
}
return $items;
}
+8
View File
@@ -55,6 +55,14 @@ enum InboxState: string
));
}
/**
* Exportierte Datensätze sind ein Archiv und werden neueste zuerst gezeigt; die Arbeitsordner bleiben älteste zuerst.
*/
public function newestFirst(): bool
{
return self::Exported === $this;
}
public function translationKey(): string
{
return '' === $this->value ? 'new' : $this->value;