aboutsummaryrefslogtreecommitdiff
path: root/src/components/mobile_nav/mobile_nav.js
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2022-08-24 22:42:58 +0300
committerHenry Jameson <me@hjkos.com>2022-08-24 22:42:58 +0300
commitf31bec7ef8bbe1659870d3f771f6b6bb1e689585 (patch)
tree00b70890867b8e606b81e0bd1f7b470c5ed41c77 /src/components/mobile_nav/mobile_nav.js
parent09a4d963d4dd336c0d46f5abed0d9a47bbd0de6e (diff)
only mark as read if closed intentionally
Diffstat (limited to 'src/components/mobile_nav/mobile_nav.js')
-rw-r--r--src/components/mobile_nav/mobile_nav.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/mobile_nav/mobile_nav.js b/src/components/mobile_nav/mobile_nav.js
index 877d52a9..3b41d2ce 100644
--- a/src/components/mobile_nav/mobile_nav.js
+++ b/src/components/mobile_nav/mobile_nav.js
@@ -28,7 +28,7 @@ const MobileNav = {
created () {
this.notificationsCloseGesture = GestureService.swipeGesture(
GestureService.DIRECTION_RIGHT,
- this.closeMobileNotifications,
+ () => this.closeMobileNotifications(true),
50
)
},
@@ -56,12 +56,14 @@ const MobileNav = {
openMobileNotifications () {
this.notificationsOpen = true
},
- closeMobileNotifications () {
+ closeMobileNotifications (markRead) {
if (this.notificationsOpen) {
// make sure to mark notifs seen only when the notifs were open and not
// from close-calls.
this.notificationsOpen = false
- this.markNotificationsAsSeen()
+ if (markRead) {
+ this.markNotificationsAsSeen()
+ }
}
},
notificationsTouchStart (e) {