refact && remove sound and logging && bugfix BIGBUG - handleGridField and showAppropriateFields sort order...
This commit is contained in:
@@ -17,10 +17,6 @@ class AcmeTopic implements TopicInterface
|
||||
/** @var EntityManager */
|
||||
protected $entityManager;
|
||||
|
||||
protected $red;
|
||||
|
||||
protected $blue;
|
||||
|
||||
/**
|
||||
* AcmeTopic constructor.
|
||||
*
|
||||
@@ -47,21 +43,10 @@ class AcmeTopic implements TopicInterface
|
||||
$user = $this->clientManipulator->getClient($connection);
|
||||
$userName = is_string($user) ? $user : $user->getUsername();
|
||||
|
||||
if ($topic->count() === 1) {
|
||||
$this->red = $userName;
|
||||
}
|
||||
|
||||
if ($topic->count() === 2) {
|
||||
$this->blue = $userName;
|
||||
}
|
||||
|
||||
$topic->broadcast([
|
||||
'userTopicId' => $connection->resourceId,
|
||||
'channel' => $topic->getId(),
|
||||
'user' => $userName,
|
||||
'color' => $userName === $this->red ? 'red' : 'blue',
|
||||
'red' => $this->red,
|
||||
'blue' => $this->blue,
|
||||
'userCnt' => $topic->count()
|
||||
]);
|
||||
}
|
||||
@@ -102,9 +87,6 @@ class AcmeTopic implements TopicInterface
|
||||
'userTopicId' => $connection->resourceId,
|
||||
'channel' => $topic->getId(),
|
||||
'user' => $userName,
|
||||
'color' => $userName === $this->red ? 'red' : 'blue',
|
||||
'red' => $this->red,
|
||||
'blue' => $this->blue,
|
||||
'userCnt' => $topic->count(),
|
||||
'data' => $event
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user