aboutsummaryrefslogtreecommitdiff
path: root/src/components/mobile_nav
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/mobile_nav')
-rw-r--r--src/components/mobile_nav/mobile_nav.js5
-rw-r--r--src/components/mobile_nav/mobile_nav.vue2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/components/mobile_nav/mobile_nav.js b/src/components/mobile_nav/mobile_nav.js
index bc63d2ba..9b341a3b 100644
--- a/src/components/mobile_nav/mobile_nav.js
+++ b/src/components/mobile_nav/mobile_nav.js
@@ -63,6 +63,11 @@ const MobileNav = {
},
markNotificationsAsSeen () {
this.$refs.notifications.markAsSeen()
+ },
+ onScroll ({ target: { scrollTop, clientHeight, scrollHeight } }) {
+ if (this.$store.state.config.autoLoad && scrollTop + clientHeight >= scrollHeight) {
+ this.$refs.notifications.fetchOlderNotifications()
+ }
}
},
watch: {
diff --git a/src/components/mobile_nav/mobile_nav.vue b/src/components/mobile_nav/mobile_nav.vue
index 30b1715f..90707ce7 100644
--- a/src/components/mobile_nav/mobile_nav.vue
+++ b/src/components/mobile_nav/mobile_nav.vue
@@ -28,7 +28,7 @@
<i class="button-icon icon-cancel"/>
</a>
</div>
- <div v-if="currentUser" class="mobile-notifications">
+ <div class="mobile-notifications" @scroll="onScroll">
<Notifications ref="notifications" noHeading="true"/>
</div>
</div>