[AB-331] showing separate notifications for the decision on a suggestion

This commit is contained in:
Sheldan
2021-09-28 22:20:11 +02:00
parent b2a94059e2
commit 4a66b7fc67

View File

@@ -28,7 +28,8 @@ public class SuggestionButtonVoteClickedListener implements ButtonClickedListene
private InteractionService interactionService; private InteractionService interactionService;
public static final String VOTE_REMOVED_TEMPLATE_KEY = "suggestion_vote_removed_notification"; public static final String VOTE_REMOVED_TEMPLATE_KEY = "suggestion_vote_removed_notification";
public static final String VOTE_CAST_TEMPLATE_KEY = "suggestion_vote_cast_notification"; public static final String VOTE_AGREEMENT_TEMPLATE_KEY = "suggestion_vote_agreement_notification";
public static final String VOTE_DISAGREEMENT_TEMPLATE_KEY = "suggestion_vote_disagreement_notification";
@Override @Override
public ButtonClickedListenerResult execute(ButtonClickedListenerModel model) { public ButtonClickedListenerResult execute(ButtonClickedListenerModel model) {
@@ -39,8 +40,10 @@ public class SuggestionButtonVoteClickedListener implements ButtonClickedListene
String templateToUse; String templateToUse;
switch (payload.getDecision()) { switch (payload.getDecision()) {
case AGREE: case AGREE:
templateToUse = VOTE_AGREEMENT_TEMPLATE_KEY;
break;
case DISAGREE: case DISAGREE:
templateToUse = VOTE_CAST_TEMPLATE_KEY; templateToUse = VOTE_DISAGREEMENT_TEMPLATE_KEY;
break; break;
default: default:
case REMOVE_VOTE: case REMOVE_VOTE: