From 3817bdc0c07ac442ab381a391f6cbc2bdf12d6a2 Mon Sep 17 00:00:00 2001 From: Felix Hammerl Date: Thu, 16 Jan 2014 11:36:30 +0100 Subject: [PATCH] toggles unread/read when clicking the circle --- src/js/controller/mail-list.js | 6 +++--- src/tpl/mail-list.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/controller/mail-list.js b/src/js/controller/mail-list.js index 4e5bffb..073f4b5 100644 --- a/src/js/controller/mail-list.js +++ b/src/js/controller/mail-list.js @@ -81,10 +81,10 @@ define(function(require) { }; /** - * Mark an email as unread + * Mark an email as unread or read, respectively */ - $scope.markUnread = function(email) { - email.unread = true; + $scope.toggleUnread = function(email) { + email.unread = !email.unread; $scope.synchronize(); }; diff --git a/src/tpl/mail-list.html b/src/tpl/mail-list.html index d5fc6a1..473aee1 100644 --- a/src/tpl/mail-list.html +++ b/src/tpl/mail-list.html @@ -13,7 +13,7 @@
  • {{email.from[0].name || email.from[0].address}}

    -
    +

    {{email.subject || 'No subject'}}