Fix crossed notify toggles for project watches

The submit and new changes buttons were cross-wired, causing the one
to impact the other's value.  Fix that, and while we are at it clarify
the names involved so there is less confusion going on.

Change-Id: Ie1b082e35b7a95913a7feb92739f79220a24a983
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2010-11-15 12:06:42 -08:00
parent 887bc2d59f
commit 6819cef106
5 changed files with 33 additions and 41 deletions

View File

@@ -24,6 +24,7 @@ import com.google.gerrit.reviewdb.PatchSet;
import com.google.gerrit.reviewdb.PatchSetApproval;
import com.google.gerrit.reviewdb.PatchSetInfo;
import com.google.gerrit.reviewdb.StarredChange;
import com.google.gerrit.reviewdb.AccountProjectWatch.NotifyType;
import com.google.gerrit.server.IdentifiedUser;
import com.google.gerrit.server.patch.PatchList;
import com.google.gerrit.server.patch.PatchListEntry;
@@ -299,7 +300,7 @@ public abstract class ChangeEmail extends OutgoingEmail {
// BCC anyone else who has interest in this project's changes
//
for (final AccountProjectWatch w : getWatches()) {
if (w.isNotifyAllComments()) {
if (w.isNotify(NotifyType.ALL_COMMENTS)) {
add(RecipientType.BCC, w.getAccountId());
}
}