summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarco Nassabain <marco.nassabain@hotmail.com>2021-03-03 23:25:49 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-04-08 22:31:21 +0200
commit6a6f89ff945cb7922dafcf7a04e67bb10483fb2d (patch)
tree8aa7a5ffca52191a370a1889f268f880baefbaa5 /lib
parent54a228eca5965b58a75b198e04047f905162b26d (diff)
🎨 Item.php: Remove shared_with
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Db/Item.php21
1 files changed, 1 insertions, 20 deletions
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) {