From 6a6f89ff945cb7922dafcf7a04e67bb10483fb2d Mon Sep 17 00:00:00 2001 From: Marco Nassabain Date: Wed, 3 Mar 2021 23:25:49 +0100 Subject: =?UTF-8?q?=F0=9F=8E=A8=20Item.php:=20Remove=20shared=5Fwith?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marco Nassabain --- lib/Db/Item.php | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'lib/Db') diff --git a/lib/Db/Item.php b/lib/Db/Item.php index f615a7555..eb3d320f3 100644 --- a/lib/Db/Item.php +++ b/lib/Db/Item.php @@ -69,8 +69,6 @@ class Item extends Entity implements IAPI, \JsonSerializable protected $categoriesJson; /** @var string */ protected $sharedBy = ''; - /** @var string */ - protected $sharedWith = ''; public function __construct() @@ -96,7 +94,6 @@ class Item extends Entity implements IAPI, \JsonSerializable $this->addType('starred', 'boolean'); $this->addType('categoriesJson', 'string'); $this->addType('sharedBy', 'string'); - $this->addType('sharedWith', 'string'); } /** @@ -292,7 +289,7 @@ class Item extends Entity implements IAPI, \JsonSerializable public function isShared(): bool { - return $this->getSharedWith() !== '' || $this->getSharedBy() !== ''; + return !is_null($this->getSharedBy()); } public function isUnread(): bool @@ -305,11 +302,6 @@ class Item extends Entity implements IAPI, \JsonSerializable return $this->sharedBy; } - public function getSharedWith(): string - { - return $this->sharedWith; - } - /** * @return null|string */ @@ -354,7 +346,6 @@ class Item extends Entity implements IAPI, \JsonSerializable 'fingerprint' => $this->getFingerprint(), 'categories' => $this->getCategories(), 'sharedBy' => $this->getSharedBy(), - 'sharedWith' => $this->getSharedWith(), 'isShared' => $this->isShared() ]; } @@ -547,16 +538,6 @@ class Item extends Entity implements IAPI, \JsonSerializable return $this; } - public function setSharedWith(string $sharedWith): self - { - if ($this->sharedWith !== $sharedWith) { - $this->sharedWith = $sharedWith; - $this->markFieldUpdated('sharedWith'); - } - - return $this; - } - public function setUnread(bool $unread): self { if ($this->unread !== $unread) { -- cgit v1.2.3