Fix paging error on loading new notifications

This commit is contained in:
Hank Grabowski 2023-11-16 09:39:25 -05:00
parent b39b5673dc
commit b28db1ea84

View file

@ -106,12 +106,14 @@ class NotificationsManager extends ChangeNotifier {
final pm = _buildPageManager(
profile,
true,
initialPages: [
PagedResponse(
<String>[],
next: PagingData(minId: highestId),
)
],
initialPages: read.isEmpty && unread.isEmpty
? []
: [
PagedResponse(
<String>[],
previous: PagingData(minId: highestId),
)
],
);
final result = await (unread.isEmpty && read.isEmpty
@ -133,7 +135,7 @@ class NotificationsManager extends ChangeNotifier {
final pm = _buildPageManager(
profile,
true,
initialPages: read.isEmpty
initialPages: read.isEmpty && unread.isEmpty
? []
: [
PagedResponse(