diff options
| author | Shpuld Shpludson <shp@cock.li> | 2019-05-03 14:47:54 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2019-05-03 14:47:54 +0000 |
| commit | b47820905c4a5b44ae0c297e3d9c5484ca202272 (patch) | |
| tree | 54b6155f0421cb81723f4da154b5e0dd3ff56685 /src/components/mobile_nav/mobile_nav.js | |
| parent | b4122c1003cee770721422d8338eb3150bb6bfaf (diff) | |
| parent | 6ae3c1cfcf896839f799888e53fc751db952b0f1 (diff) | |
Merge branch '516-autoload' into 'develop'
Autoload older notifications when scrolled to the bottom
Closes #516
See merge request pleroma/pleroma-fe!780
Diffstat (limited to 'src/components/mobile_nav/mobile_nav.js')
| -rw-r--r-- | src/components/mobile_nav/mobile_nav.js | 5 |
1 files changed, 5 insertions, 0 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: { |
