Removing dead code
This commit is contained in:
parent
76261de805
commit
3b278d0498
6 changed files with 9 additions and 189 deletions
|
@ -1,9 +1,9 @@
|
|||
import {HtmlUtils} from "./HtmlUtils";
|
||||
import type {ShowReportCallBack} from "./MediaManager";
|
||||
import type {UserInputManager} from "../Phaser/UserInput/UserInputManager";
|
||||
import {connectionManager} from "../Connexion/ConnectionManager";
|
||||
import {GameConnexionTypes} from "../Url/UrlManager";
|
||||
import {iframeListener} from "../Api/IframeListener";
|
||||
import {showReportScreenStore} from "../Stores/ShowReportScreenStore";
|
||||
|
||||
export type SendMessageCallback = (message:string) => void;
|
||||
|
||||
|
@ -104,11 +104,11 @@ export class DiscussionManager {
|
|||
}
|
||||
|
||||
public addParticipant(
|
||||
userId: number|string,
|
||||
userId: number|'me',
|
||||
name: string|undefined,
|
||||
img?: string|undefined,
|
||||
isMe: boolean = false,
|
||||
showReportCallBack?: ShowReportCallBack
|
||||
//showReportCallBack?: ShowReportCallBack
|
||||
) {
|
||||
const divParticipant: HTMLDivElement = document.createElement('div');
|
||||
divParticipant.classList.add('participant');
|
||||
|
@ -132,16 +132,13 @@ export class DiscussionManager {
|
|||
!isMe
|
||||
&& connectionManager.getConnexionType
|
||||
&& connectionManager.getConnexionType !== GameConnexionTypes.anonymous
|
||||
&& userId !== 'me'
|
||||
) {
|
||||
const reportBanUserAction: HTMLButtonElement = document.createElement('button');
|
||||
reportBanUserAction.classList.add('report-btn')
|
||||
reportBanUserAction.innerText = 'Report';
|
||||
reportBanUserAction.addEventListener('click', () => {
|
||||
if(showReportCallBack) {
|
||||
showReportCallBack(`${userId}`, name);
|
||||
}else{
|
||||
console.info('report feature is not activated!');
|
||||
}
|
||||
showReportScreenStore.set({ userId: userId, userName: name ? name : ''});
|
||||
});
|
||||
divParticipant.appendChild(reportBanUserAction);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue