Skip to content

Commit

Permalink
adequando implementação da biblioteca parody
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioconselheiro committed Nov 18, 2024
1 parent a3a5433 commit 5bfb99b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ChatModule } from './pages/chat/chat.module';
import { OmegleModule } from './shared/pool/omegle.module';
import { OmegleModule } from './shared/omegle/omegle.module';
import { ErrorHandlingModule } from '@shared/error-handling/error-handling.module';
import { ToastrModule } from 'ngx-toastr';
import { AsyncModalModule } from '@belomonte/async-modal-ngx';
Expand Down
4 changes: 0 additions & 4 deletions src/app/domain/user-status.enum.ts

This file was deleted.

8 changes: 4 additions & 4 deletions src/app/pages/chat/chat.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class ChatComponent implements OnDestroy, OnInit {

constructor(
private globalErrorHandler: GlobalErrorHandler,
private findStrangerProxy: FindStrangerService,
private findStrangerService: FindStrangerService,
private talkToStrangerNostr: TalkToStrangerNostr,
private soundNotificationService: SoundNotificationService,
private modalService: ModalService
Expand Down Expand Up @@ -81,9 +81,8 @@ export class ChatComponent implements OnDestroy, OnInit {
this.whoDisconnected = null;
this.currentState = this.stateSearchingStranger;
this.messages = [];
this.findStrangerProxy.createSession();

this.findStrangerProxy
this.findStrangerService
.searchStranger({
signal: this.controller.signal,
searchTags: [ 'omegle' ],
Expand All @@ -101,12 +100,13 @@ export class ChatComponent implements OnDestroy, OnInit {
});
}

// FIXME: preciso revisar este método, pois o endSession já é executado internamente na biblioteca quando se recebe um status de disconnected
endSession(): Promise<void> {
this.subscriptions.unsubscribe();
this.subscriptions = new Subscription();

this.stranger = null;
return this.findStrangerProxy
return this.findStrangerService
.endSession()
.then(() => {
this.currentState = ChatState.DISCONNECTED;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class OmegleNPoolOpts implements NPoolOpts<NRelay1> {
constructor(
private relayConfigService: RelayConfigService
) { }

open(url: string): NRelay1 {
return new NRelay1(url);
}
Expand Down

0 comments on commit 5bfb99b

Please sign in to comment.