Private
Public Access
1
0

refact && remove sound and logging && bugfix BIGBUG - handleGridField and showAppropriateFields sort order...

This commit is contained in:
2016-10-28 16:16:27 +02:00
parent 5b4fdd088c
commit 0a22968e56
6 changed files with 113 additions and 238 deletions

View File

@@ -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
]);