-import { map, share, switchMap, tap } from 'rxjs/operators'
+import { map, shareReplay, switchMap, tap } from 'rxjs/operators'
import { HttpClient } from '@angular/common/http'
import { Inject, Injectable, LOCALE_ID } from '@angular/core'
import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage'
// Default locale, nothing to translate
if (isDefaultLocale(completeLocale)) {
- this.localeObservable = of({}).pipe(share())
+ this.localeObservable = of({}).pipe(shareReplay())
return
}
this.localeObservable = this.http
.get(ServerService.BASE_LOCALE_URL + completeLocale + '/server.json')
- .pipe(share())
+ .pipe(shareReplay())
}
private saveConfigLocally (config: ServerConfig) {