Browse Source

add remove vote url

pull/55/head
Thodoris1999 6 years ago
parent
commit
290daf8eab
  1. 10
      app/src/main/java/gr/thmmy/mthmmy/model/Poll.java

10
app/src/main/java/gr/thmmy/mthmmy/model/Poll.java

@ -6,14 +6,16 @@ public class Poll {
private final String question;
private Entry[] entries;
private int availableVoteCount;
private String pollFormUrl, sc;
private String pollFormUrl, sc, removeVoteUrl;
public Poll(String question, Entry[] entries, int availableVoteCount, String pollFormUrl, String sc) {
public Poll(String question, Entry[] entries, int availableVoteCount, String pollFormUrl, String sc,
String removeVoteUrl) {
this.question = question;
this.entries = entries;
this.availableVoteCount = availableVoteCount;
this.pollFormUrl = pollFormUrl;
this.sc = sc;
this.removeVoteUrl = removeVoteUrl;
}
public String getQuestion() {
@ -36,6 +38,10 @@ public class Poll {
return sc;
}
public String getRemoveVoteUrl() {
return removeVoteUrl;
}
public int totalVotes() {
int sum = 0;
for (Entry entry : entries) {

Loading…
Cancel
Save