diff --git a/app/shared/components/chat.component.ts b/app/shared/components/chat.component.ts
index f44dc4e..24d6f15 100644
--- a/app/shared/components/chat.component.ts
+++ b/app/shared/components/chat.component.ts
@@ -10,6 +10,7 @@ import { FeedService } from '../services/feed.service';
export class ChatComponent implements OnInit {
@Input() matches: Match[];
+ @Input() connection: string;
messages: ChatMessage[];
constructor(private feedService: FeedService) { }
diff --git a/app/shared/interfaces.ts b/app/shared/interfaces.ts
index f87d129..1f0182d 100644
--- a/app/shared/interfaces.ts
+++ b/app/shared/interfaces.ts
@@ -9,7 +9,7 @@ export interface FeedProxy {
}
export interface FeedClient {
- userConnected: (user: any) => void;
+ setConnectionId: (id: string) => void;
userDisconnected: (id: string) => void;
updateMatch: (match: Match) => void;
diff --git a/app/shared/services/feed.service.ts b/app/shared/services/feed.service.ts
index ef94bd6..580da60 100644
--- a/app/shared/services/feed.service.ts
+++ b/app/shared/services/feed.service.ts
@@ -13,14 +13,14 @@ export class FeedService {
currentState = SignalRConnectionStatus.Disconnected;
connectionState: Observable ;
- userConnected: Observable;
+ setConnectionId: Observable;
updateMatch: Observable;
addFeed: Observable;
addChatMessage: Observable;
private connectionStateSubject = new Subject();
- private userConnectedSubject = new Subject();
-
+
+ private setConnectionIdSubject = new Subject();
private updateMatchSubject = new Subject();
private addFeedSubject = new Subject();
private addChatMessageSubject = new Subject();
@@ -30,7 +30,7 @@ export class FeedService {
constructor(private http: Http) {
this.connectionState = this.connectionStateSubject.asObservable();
- this.userConnected = this.userConnectedSubject.asObservable();
+ this.setConnectionId = this.setConnectionIdSubject.asObservable();
this.updateMatch = this.updateMatchSubject.asObservable();
this.addFeed = this.addFeedSubject.asObservable();
this.addChatMessage = this.addChatMessageSubject.asObservable();
@@ -48,7 +48,7 @@ export class FeedService {
* @desc callback when a new user connect to the chat
* @param User user, the connected user
*/
- feedHub.client.userConnected = user => this.onUserConnected(user);
+ feedHub.client.setConnectionId = id => this.onSetConnectionId(id);
/**
* @desc callback when match score is updated
@@ -77,8 +77,8 @@ export class FeedService {
}
// Client side methods
- private onUserConnected(user: any) {
- this.userConnectedSubject.next(user);
+ private onSetConnectionId(id: string) {
+ this.setConnectionIdSubject.next(id);
}
private onUpdateMatch(match: Match) {
diff --git a/wwwroot/css/site.css b/wwwroot/css/site.css
index 364ecbd..87b0ab2 100644
--- a/wwwroot/css/site.css
+++ b/wwwroot/css/site.css
@@ -33,7 +33,7 @@ th, td {
}
.chat-table {
- height: 240px;
+ height: 253px;
overflow: auto;
}
|