Fix tombol Muat lebih banyak: cek filteredSales.length bukan state.sales (negatif -17)

This commit is contained in:
Onie
2026-10-18 03:39:03 +07:00
parent 812fb13eca
commit f99324b851

View File

@@ -395,7 +395,10 @@ class _RiwayatScreenState extends State<RiwayatScreen> {
}, },
color: kAccent, color: kAccent,
child: ListView.separated( child: ListView.separated(
itemCount: displayedSales.length + (state.hasMoreSales ? 1 : 0), itemCount: displayedSales.length +
(filteredSales.length > state.visibleSalesCount
? 1
: 0),
separatorBuilder: (_, __) => separatorBuilder: (_, __) =>
const SizedBox(height: 10), const SizedBox(height: 10),
itemBuilder: (context, i) { itemBuilder: (context, i) {