Code cleanup
This commit is contained in:
@@ -1,29 +1,21 @@
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { NgxMatDatetimePickerModule } from '@angular-material-components/datetime-picker';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { AuthConfigModule } from './auth/auth-config.module';
|
||||
import { MaterialModule } from './material/material.module';
|
||||
import { MatGridListModule } from '@angular/material/grid-list';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import {MatListModule} from '@angular/material/list';
|
||||
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
|
||||
|
||||
import { HomeComponent } from './pages/home/home.component';
|
||||
import { TravelComponent } from './pages/travel/travel.component';
|
||||
import { EditTravelComponent } from './pages/edit-travel/edit-travel.component';
|
||||
|
||||
import { HomeComponent } from './pages/home/home.component';
|
||||
import { NewTravelComponent } from './pages/new-travel/new-travel.component';
|
||||
import { TravelComponent } from './pages/travel/travel.component';
|
||||
import { AvailablePlacesPipe } from './pipes/available-places.pipe';
|
||||
import { AppRouterModule } from './router.module';
|
||||
import { ChatComponent } from './views/chat/chat.component';
|
||||
import { HeaderComponent } from './views/header/header.component';
|
||||
import { ListComponent } from './views/list/list.component';
|
||||
import { TravelFormComponent } from './views/travel-form/travel-form.component';
|
||||
import { NewTravelComponent } from './pages/new-travel/new-travel.component';
|
||||
import { AppRouterModule } from './router.module';
|
||||
import { AvailablePlacesPipe } from './pipes/available-places.pipe';
|
||||
import { AuthConfigModule } from './auth/auth-config.module';
|
||||
import { ChatComponent } from './views/chat/chat.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -34,11 +26,6 @@ import { ChatComponent } from './views/chat/chat.component';
|
||||
BrowserAnimationsModule,
|
||||
AppRouterModule,
|
||||
MaterialModule,
|
||||
MatListModule,
|
||||
MatGridListModule,
|
||||
MatDatepickerModule,
|
||||
NgxMatDatetimePickerModule,
|
||||
NgxMatMomentModule,
|
||||
AuthConfigModule
|
||||
],
|
||||
declarations: [
|
||||
@@ -53,12 +40,6 @@ import { ChatComponent } from './views/chat/chat.component';
|
||||
AvailablePlacesPipe,
|
||||
ChatComponent
|
||||
],
|
||||
providers: [
|
||||
// (useHash) ? { provide: LocationStrategy, useClass: HashLocationStrategy } : [],
|
||||
// {provide: AuthConfig, useValue: authConfig },
|
||||
// { provide: OAuthStorage, useValue: localStorage },
|
||||
// { provide: ValidationHandler, useClass: JwksValidationHandler },
|
||||
],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule { }
|
||||
|
||||
@@ -10,6 +10,9 @@ import { MatSortModule } from '@angular/material/sort';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import { NgxMatDatetimePickerModule } from '@angular-material-components/datetime-picker';
|
||||
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
|
||||
|
||||
|
||||
@NgModule({
|
||||
@@ -24,6 +27,11 @@ import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
MatPaginatorModule,
|
||||
MatSortModule,
|
||||
MatDatepickerModule,
|
||||
MatListModule,
|
||||
MatGridListModule,
|
||||
MatDatepickerModule,
|
||||
NgxMatDatetimePickerModule,
|
||||
NgxMatMomentModule,
|
||||
MatProgressSpinnerModule
|
||||
],
|
||||
exports: [
|
||||
@@ -36,6 +44,11 @@ import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
MatPaginatorModule,
|
||||
MatSortModule,
|
||||
MatDatepickerModule,
|
||||
MatListModule,
|
||||
MatGridListModule,
|
||||
MatDatepickerModule,
|
||||
NgxMatDatetimePickerModule,
|
||||
NgxMatMomentModule,
|
||||
MatProgressSpinnerModule
|
||||
]
|
||||
})
|
||||
|
||||
@@ -9,7 +9,7 @@ export class ChatMessageHandler {
|
||||
private matrixClientPromise: Promise<MatrixClient>,
|
||||
) { }
|
||||
|
||||
getRoomMessages = (roomId: string) => {
|
||||
getRoomMessages = (roomId: string): Subject<MatrixEvent> => {
|
||||
const subject = new Subject<MatrixEvent>();
|
||||
|
||||
this.publishRoomOldMessages(roomId, subject);
|
||||
|
||||
Reference in New Issue
Block a user