Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Niedermann <info@niedermann.it>2020-07-15 16:39:08 +0300
committerStefan Niedermann <info@niedermann.it>2020-07-15 16:39:08 +0300
commitb1a5de44f7aa8fe43fc37becbbd6834f07e7cb9c (patch)
tree0a7f106e4b18b5584ad9090f0bef00acc8ebf2d9 /app/src/main/java/it/niedermann/nextcloud/deck/model
parentd75a75dfe1468a8eea96c42cccfa383119901faa (diff)
#573 Projects - List view of projects in CardDetailsFragment
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/model')
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullCard.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullCard.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullCard.java
index 6f3913f45..d48bf5626 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullCard.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/full/FullCard.java
@@ -19,6 +19,7 @@ import it.niedermann.nextcloud.deck.model.Label;
import it.niedermann.nextcloud.deck.model.User;
import it.niedermann.nextcloud.deck.model.interfaces.IRemoteEntity;
import it.niedermann.nextcloud.deck.model.ocs.comment.DeckComment;
+import it.niedermann.nextcloud.deck.model.ocs.projects.OcsProject;
public class FullCard implements IRemoteEntity, DragAndDropModel {
@@ -46,6 +47,9 @@ public class FullCard implements IRemoteEntity, DragAndDropModel {
@Relation(entity = DeckComment.class, parentColumn = "localId", entityColumn = "objectId", projection = "localId")
public List<Long> commentIDs;
+ @Ignore // TODO change to @Relation
+ @NonNull
+ private List<OcsProject> projects = new ArrayList<>();
public FullCard() {
super();
@@ -58,6 +62,7 @@ public class FullCard implements IRemoteEntity, DragAndDropModel {
this.owner = copyList(fullCard.getOwner());
this.attachments = copyList(fullCard.getAttachments());
this.commentIDs = copyList(fullCard.getCommentIDs());
+ this.projects = copyList(fullCard.getProjects());
}
public Card getCard() {
@@ -122,6 +127,16 @@ public class FullCard implements IRemoteEntity, DragAndDropModel {
this.attachments = attachments;
}
+ @NonNull
+ public List<OcsProject> getProjects() {
+ return projects;
+ }
+
+ public void setProjects(@NonNull List<OcsProject> projects) {
+ this.projects.clear();
+ this.projects.addAll(projects);
+ }
+
@Ignore
@Override
public IRemoteEntity getEntity() {