clean code

This commit is contained in:
Chneemann 2024-05-28 03:32:39 +02:00
parent e0677e9971
commit b5389130cb
4 changed files with 3 additions and 26 deletions

View file

@ -57,7 +57,6 @@ export class MainChatComponent {
openMenu: boolean = false; openMenu: boolean = false;
showProfil: boolean = false; showProfil: boolean = false;
talkToUser!: User[]; talkToUser!: User[];
routToPrvCHannel: boolean = false;
constructor( constructor(
private route: Router, private route: Router,
@ -297,7 +296,6 @@ export class MainChatComponent {
if ('firstName' in element) { if ('firstName' in element) {
this.chatService.inputValue = `@${element.firstName} ${element.lastName}`; this.chatService.inputValue = `@${element.firstName} ${element.lastName}`;
const getUserID = element.id!; const getUserID = element.id!;
this.routToPrvCHannel = true;
this.checkIfPrvChatExist(getUserID); this.checkIfPrvChatExist(getUserID);
} else { } else {
this.chatService.inputValue = `#${element.name}`; this.chatService.inputValue = `#${element.name}`;

View file

@ -1,15 +1,5 @@
import { import { Component, EventEmitter, Input, Output } from '@angular/core';
Component, import { Chat, ChatAnswers } from '../../../../interface/chat.interface';
EventEmitter,
HostListener,
Input,
Output,
} from '@angular/core';
import {
Chat,
ChatAnswers,
ChatReactions,
} from '../../../../interface/chat.interface';
import { SingleChatComponent } from '../single-chat.component'; import { SingleChatComponent } from '../single-chat.component';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule, NgForm } from '@angular/forms'; import { FormsModule, NgForm } from '@angular/forms';

View file

@ -1,11 +1,4 @@
import { import { Component, Input } from '@angular/core';
AfterViewInit,
Component,
ElementRef,
HostListener,
Input,
ViewChild,
} from '@angular/core';
import { SmallBtnComponent } from '../../../../shared/components/small-btn/small-btn.component'; import { SmallBtnComponent } from '../../../../shared/components/small-btn/small-btn.component';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { import {
@ -15,10 +8,8 @@ import {
} from '../../../../interface/chat.interface'; } from '../../../../interface/chat.interface';
import { UserService } from '../../../../service/user.service'; import { UserService } from '../../../../service/user.service';
import { ChatService } from '../../../../service/chat.service'; import { ChatService } from '../../../../service/chat.service';
import { ChannleService } from '../../../../service/channle.service';
import { EmojiPickerComponent } from '../../../../shared/components/emoji-picker/emoji-picker.component'; import { EmojiPickerComponent } from '../../../../shared/components/emoji-picker/emoji-picker.component';
import { EmojiComponent } from '@ctrl/ngx-emoji-mart/ngx-emoji'; import { EmojiComponent } from '@ctrl/ngx-emoji-mart/ngx-emoji';
import { timeInterval } from 'rxjs';
import { User } from '../../../../interface/user.interface'; import { User } from '../../../../interface/user.interface';
import { SharedService } from '../../../../service/shared.service'; import { SharedService } from '../../../../service/shared.service';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
@ -51,7 +42,6 @@ export class ReactionEmojisComponent {
dialogY: number = 0; dialogY: number = 0;
constructor( constructor(
private elementRef: ElementRef,
public userService: UserService, public userService: UserService,
private chatService: ChatService, private chatService: ChatService,
private sharedService: SharedService private sharedService: SharedService

View file

@ -47,7 +47,6 @@ export class MainComponent implements OnInit {
public channelService: ChannleService, public channelService: ChannleService,
private router: Router, private router: Router,
private route: ActivatedRoute, private route: ActivatedRoute,
private elementRef: ElementRef,
public toggleAllBooleans: ToggleBooleanService, public toggleAllBooleans: ToggleBooleanService,
private sharedService: SharedService private sharedService: SharedService
) {} ) {}