Echo: Reset user notification count when adding a new notification

Change-Id: If4057ba9f6a016189c60836c64333ac0b0572450
This commit is contained in:
Andrew Garrett 2012-07-17 13:39:45 -07:00
parent acd4ee2102
commit fc0b870486
2 changed files with 1 additions and 2 deletions

View file

@ -42,8 +42,6 @@ class EchoHooks {
if ( $type == 'edit' ) { if ( $type == 'edit' ) {
if ( ! $user->getOption('enotifwatchlistpages') ) { if ( ! $user->getOption('enotifwatchlistpages') ) {
$notifyTypes = array_diff( $notifyTypes, array('email') ); $notifyTypes = array_diff( $notifyTypes, array('email') );
} else {
} }
} elseif ( $type == 'edit-user-talk' ) { } elseif ( $type == 'edit-user-talk' ) {
if ( ! $user->getOption('enotifusertalkpages') ) { if ( ! $user->getOption('enotifusertalkpages') ) {

View file

@ -10,6 +10,7 @@ class EchoNotifier {
*/ */
public static function notifyWithNotification( $user, $event ) { public static function notifyWithNotification( $user, $event ) {
EchoNotification::create( array( 'user' => $user, 'event' => $event) ); EchoNotification::create( array( 'user' => $user, 'event' => $event) );
EchoNotificationController::resetNotificationCount( $user );
} }
/** /**