only mark as read if closed intentionally
This commit is contained in:
parent
09a4d963d4
commit
f31bec7ef8
@ -28,7 +28,7 @@ const MobileNav = {
|
|||||||
created () {
|
created () {
|
||||||
this.notificationsCloseGesture = GestureService.swipeGesture(
|
this.notificationsCloseGesture = GestureService.swipeGesture(
|
||||||
GestureService.DIRECTION_RIGHT,
|
GestureService.DIRECTION_RIGHT,
|
||||||
this.closeMobileNotifications,
|
() => this.closeMobileNotifications(true),
|
||||||
50
|
50
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@ -56,12 +56,14 @@ const MobileNav = {
|
|||||||
openMobileNotifications () {
|
openMobileNotifications () {
|
||||||
this.notificationsOpen = true
|
this.notificationsOpen = true
|
||||||
},
|
},
|
||||||
closeMobileNotifications () {
|
closeMobileNotifications (markRead) {
|
||||||
if (this.notificationsOpen) {
|
if (this.notificationsOpen) {
|
||||||
// make sure to mark notifs seen only when the notifs were open and not
|
// make sure to mark notifs seen only when the notifs were open and not
|
||||||
// from close-calls.
|
// from close-calls.
|
||||||
this.notificationsOpen = false
|
this.notificationsOpen = false
|
||||||
this.markNotificationsAsSeen()
|
if (markRead) {
|
||||||
|
this.markNotificationsAsSeen()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
notificationsTouchStart (e) {
|
notificationsTouchStart (e) {
|
||||||
|
@ -56,15 +56,15 @@
|
|||||||
>
|
>
|
||||||
<div class="mobile-notifications-header">
|
<div class="mobile-notifications-header">
|
||||||
<span class="title">{{ $t('notifications.notifications') }}</span>
|
<span class="title">{{ $t('notifications.notifications') }}</span>
|
||||||
<a
|
<button
|
||||||
class="mobile-nav-button"
|
class="button-unstyled mobile-nav-button"
|
||||||
@click.stop.prevent="closeMobileNotifications()"
|
@click.stop.prevent="closeMobileNotifications(true)"
|
||||||
>
|
>
|
||||||
<FAIcon
|
<FAIcon
|
||||||
class="fa-scale-110 fa-old-padding"
|
class="fa-scale-110 fa-old-padding"
|
||||||
icon="times"
|
icon="times"
|
||||||
/>
|
/>
|
||||||
</a>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
id="mobile-notifications"
|
id="mobile-notifications"
|
||||||
|
Loading…
Reference in New Issue
Block a user