mirror of
https://github.com/feeddeck/feeddeck.git
synced 2026-05-01 03:47:57 -05:00
[core] Fix Number of Loaded Items per Fetch (#46)
We always loaded 51 items per fetch instead of 50 items, because we used a range of 0 to 50 which includes the item at position 0 and at position 50. This is now fixed by adjusting the range to 0 to 49, so that exactly 50 items are loaded per fetch request. This commit also improves the number of loaded items shown in the column header. If the status of the ItemsRepository is "loaded" we add a small "+" symbol behind the number to indicat that there are more items, which could be loaded. If the last page was already fetched (status == "loadedLast") then the "+" symbol isn't shown.
This commit is contained in:
@@ -121,7 +121,7 @@ class _ColumnLayoutHeaderState extends State<ColumnLayoutHeader> {
|
||||
),
|
||||
Text(
|
||||
Characters(
|
||||
'${items.column.sources.length} ${items.column.sources.length == 1 ? 'Source' : 'Sources'} / ${items.items.length} ${items.items.length == 1 ? 'Item' : 'Items'}',
|
||||
'${items.column.sources.length} ${items.column.sources.length == 1 ? 'Source' : 'Sources'} / ${items.items.length}${items.status == ItemsStatus.loaded ? '+' : ''} ${items.items.length == 1 ? 'Item' : 'Items'}',
|
||||
)
|
||||
.replaceAll(
|
||||
Characters(''),
|
||||
|
||||
Reference in New Issue
Block a user