Skip to content

Commit b9723ea

Browse files
committed
feat: remove share status from share:list as it doesn't seem to contain usefull info at the moment
Signed-off-by: Robin Appelman <[email protected]>
1 parent 9626c08 commit b9723ea

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

apps/files_sharing/lib/Command/ListShares.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@ class ListShares extends Base {
3434
IShare::TYPE_DECK => 'deck',
3535
];
3636

37-
private const SHARE_STATUS_NAMES = [
38-
IShare::STATUS_PENDING => 'pending',
39-
IShare::STATUS_ACCEPTED => 'accepted',
40-
IShare::STATUS_REJECTED => 'rejected',
41-
];
42-
4337
public function __construct(
4438
private readonly IManager $shareManager,
4539
private readonly IRootFolder $rootFolder,
@@ -85,7 +79,6 @@ public function execute(InputInterface $input, OutputInterface $output): int {
8579
'recipient' => $share->getSharedWith(),
8680
'by' => $share->getSharedBy(),
8781
'type' => self::SHARE_TYPE_NAMES[$share->getShareType()] ?? 'unknown',
88-
'status' => self::SHARE_STATUS_NAMES[$share->getStatus()] ?? 'unknown',
8982
];
9083
}, $shares);
9184

@@ -126,15 +119,6 @@ private function getShareType(string $type): int {
126119
throw new \Exception("Unknown share type $type");
127120
}
128121

129-
private function getShareStatus(string $status): int {
130-
foreach (self::SHARE_STATUS_NAMES as $shareStatus => $shareStatusName) {
131-
if ($shareStatusName === $status) {
132-
return $shareStatus;
133-
}
134-
}
135-
throw new \Exception("Unknown share status $status");
136-
}
137-
138122
private function shouldShowShare(InputInterface $input, IShare $share): bool {
139123
if ($input->getOption('owner') && $share->getShareOwner() !== $input->getOption('owner')) {
140124
return false;
@@ -172,9 +156,6 @@ private function shouldShowShare(InputInterface $input, IShare $share): bool {
172156
if ($input->getOption('type') && $share->getShareType() !== $this->getShareType($input->getOption('type'))) {
173157
return false;
174158
}
175-
if ($input->getOption('status') && $share->getStatus() !== $this->getShareStatus($input->getOption('status'))) {
176-
return false;
177-
}
178159
return true;
179160
}
180161
}

0 commit comments

Comments
 (0)