Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
  • Loading branch information
st3iny and nickvergessen authored Aug 18, 2023
1 parent 32b7a79 commit 32aa402
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/Dashboard/TalkWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Comments\IComment;
use OCP\Dashboard\IAPIWidget;
use OCP\Dashboard\IAPIWidgetV2;
use OCP\Dashboard\IButtonWidget;
use OCP\Dashboard\IConditionalWidget;
use OCP\Dashboard\IIconWidget;
Expand All @@ -54,7 +53,7 @@
use OCP\IUserSession;
use OCP\Util;

class TalkWidget implements IAPIWidget, IAPIWidgetV2, IIconWidget, IButtonWidget, IOptionWidget, IConditionalWidget, IReloadableWidget {
class TalkWidget implements IAPIWidget, IIconWidget, IButtonWidget, IOptionWidget, IConditionalWidget, IReloadableWidget {

public function __construct(
protected IUserSession $userSession,
Expand All @@ -66,7 +65,6 @@ public function __construct(
protected ParticipantService $participantService,
protected MessageParser $messageParser,
protected ITimeFactory $timeFactory,
protected TalkSession $session,
) {
}

Expand Down Expand Up @@ -178,8 +176,7 @@ public function getItems(string $userId, ?string $since = null, int $limit = 7):
* @inheritDoc
*/
public function getItemsV2(string $userId, ?string $since = null, int $limit = 7): WidgetItems {
$sessionIds = $this->session->getAllActiveSessions();
$allRooms = $this->manager->getRoomsForUser($userId, $sessionIds, true);
$allRooms = $this->manager->getRoomsForUser($userId, [], true);

$rooms = [];
$mentions = [];
Expand Down

0 comments on commit 32aa402

Please sign in to comment.