From fee7e200bcdedec3121882ba602be4e470c7bb6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 12 Mar 2020 11:22:03 +0100 Subject: [PATCH 1/2] MOBILE-3325 settings: Fix cache entries count --- src/core/settings/providers/helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/settings/providers/helper.ts b/src/core/settings/providers/helper.ts index b61b0a79d..9d4769bfe 100644 --- a/src/core/settings/providers/helper.ts +++ b/src/core/settings/providers/helper.ts @@ -172,7 +172,7 @@ export class CoreSettingsHelper { let totalEntries = 0; await Promise.all(clearTables.map(async (name) => - totalEntries += await site.getDb().countRecords(name) + totalEntries = await site.getDb().countRecords(name) + totalEntries )); return totalEntries; From a237a03753f204158522ed05c3c80810288b5755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 12 Mar 2020 12:12:02 +0100 Subject: [PATCH 2/2] MOBILE-3330 message: Use native scrollTop value to avoid non updated val --- src/providers/utils/dom.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/providers/utils/dom.ts b/src/providers/utils/dom.ts index 748e73923..89e3d9fbf 100644 --- a/src/providers/utils/dom.ts +++ b/src/providers/utils/dom.ts @@ -1056,13 +1056,14 @@ export class CoreDomUtilsProvider { /** * Returns scrollTop of the content. - * Checks hidden property _scroll to avoid errors if view is not active. + * Checks hidden property _scrollContent to avoid errors if view is not active. + * Using navite value of scroll to avoid having non updated values. * * @param content Content where to execute the function. * @return Content scrollTop or 0. */ getScrollTop(content: Content): number { - return (content && content._scroll && content.scrollTop) || 0; + return (content && content._scrollContent && content._scrollContent.nativeElement.scrollTop) || 0; } /**