diff options
author | desperateCoder <echotodevnull@gmail.com> | 2019-10-19 22:08:55 +0300 |
---|---|---|
committer | desperateCoder <echotodevnull@gmail.com> | 2019-10-19 22:08:55 +0300 |
commit | 5007476ae816f37c86f598e8ed7a86b183b2a033 (patch) | |
tree | f46460f8aba25c0389f40cf234954003b7e6bde6 | |
parent | e6577804a09351a7538c614ce0cfca3fee5e6677 (diff) |
#181: because it"didn't work", stefan says
4 files changed, 21 insertions, 0 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/Card.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/Card.java index 8ee7bbcae..d7a27372c 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/model/Card.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/Card.java @@ -57,6 +57,7 @@ public class Card extends AbstractRemoteEntity { } public Card(Card card) { + super(card); this.title = card.getTitle(); this.description = card.getDescription(); this.stackId = card.getStackId(); diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/Label.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/Label.java index a90012a14..77c8d67ae 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/model/Label.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/Label.java @@ -26,6 +26,7 @@ public class Label extends AbstractRemoteEntity { } public Label(Label labelToCopy) { + super(labelToCopy); this.title = labelToCopy.getTitle(); this.color = labelToCopy.getColor(); this.boardId = labelToCopy.getBoardId(); diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/User.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/User.java index db05f5d2e..cfb48d543 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/model/User.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/User.java @@ -25,6 +25,13 @@ public class User extends AbstractRemoteEntity { this.displayname = displayname; } + public User(User user) { + super(user); + this.primaryKey = user.getPrimaryKey(); + this.uid = user.getUid(); + this.displayname = user.getDisplayname(); + } + public String getPrimaryKey() { return primaryKey; } diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/interfaces/AbstractRemoteEntity.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/interfaces/AbstractRemoteEntity.java index 21fd9fe42..328c642ae 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/model/interfaces/AbstractRemoteEntity.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/interfaces/AbstractRemoteEntity.java @@ -41,6 +41,18 @@ public abstract class AbstractRemoteEntity implements IRemoteEntity { protected Date lastModified; protected Date lastModifiedLocal; + public AbstractRemoteEntity() { + } + + public AbstractRemoteEntity(AbstractRemoteEntity abstractRemoteEntity) { + this.localId = abstractRemoteEntity.getLocalId(); + this.accountId = abstractRemoteEntity.getAccountId(); + this.id = abstractRemoteEntity.getId(); + this.status = abstractRemoteEntity.getStatus(); + this.lastModified = abstractRemoteEntity.getLastModified(); + this.lastModifiedLocal = abstractRemoteEntity.getLastModifiedLocal(); + } + @Ignore @Override public IRemoteEntity getEntity() { |