forked from shihaam/thijooree
pull more notifications at once
This commit is contained in:
@@ -117,7 +117,7 @@ class MibActivityHistoryClient {
|
|||||||
session: MibSession,
|
session: MibSession,
|
||||||
loginId: String,
|
loginId: String,
|
||||||
minCount: Int = 5,
|
minCount: Int = 5,
|
||||||
pageSize: Int = 30
|
pageSize: Int = 100
|
||||||
): FetchResult {
|
): FetchResult {
|
||||||
val accumulated = mutableListOf<AppNotification>()
|
val accumulated = mutableListOf<AppNotification>()
|
||||||
var start = 1
|
var start = 1
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ class NotificationsSheetFragment : BottomSheetDialogFragment() {
|
|||||||
if (mibDone[loginId] == true) return@forEach
|
if (mibDone[loginId] == true) return@forEach
|
||||||
val start = mibNextStart[loginId] ?: 1
|
val start = mibNextStart[loginId] ?: 1
|
||||||
val result = withContext(Dispatchers.IO) {
|
val result = withContext(Dispatchers.IO) {
|
||||||
mibClient.fetchActivity(session, loginId, start, start + 29)
|
mibClient.fetchActivity(session, loginId, start, start + 99)
|
||||||
}
|
}
|
||||||
if (result.items.isNotEmpty() && isAdded) {
|
if (result.items.isNotEmpty() && isAdded) {
|
||||||
val readIds = NotificationsCache.getMibReadIds(requireContext())
|
val readIds = NotificationsCache.getMibReadIds(requireContext())
|
||||||
|
|||||||
Reference in New Issue
Block a user