add oneClick system notifications translations

This commit is contained in:
MathieuG-P
2022-12-26 20:48:36 +01:00
parent 36eca807ad
commit af69c821a7
8 changed files with 84 additions and 23 deletions
@@ -1,6 +1,5 @@
import { BehaviorSubject } from "rxjs";
import { SystemNotificationOptions } from "shared/models/notification/system-notification.model";
import { I18nService } from "./i18n.service";
import { IpcService } from "./ipc.service";
export class NotificationService{
@@ -17,11 +16,9 @@ export class NotificationService{
public readonly notifications$: BehaviorSubject<ResolvableNotification[]>;
private readonly ipc: IpcService;
private readonly i18n: I18nService;
private constructor(){
this.ipc = IpcService.getInstance();
this.i18n = I18nService.getInstance();
this.notifications$ = new BehaviorSubject<ResolvableNotification[]>([]);
}
@@ -57,10 +54,6 @@ export class NotificationService{
}
public notifySystem(options: SystemNotificationOptions){
options.body = options.body && this.i18n.translate(options.body);
options.title = options.title && this.i18n.translate(options.title);
this.ipc.sendLazy<SystemNotificationOptions>("notify-system", {args: options});
}
@@ -40,8 +40,6 @@ export class PlaylistDownloaderService{
public oneClickInstallPlaylist(bpListUrl: string): Observable<DownloadPlaylistProgression>{
if(!this.progress.require()){ return null; }
this.progressWatcher$.next(null);
const res = new Subject<DownloadPlaylistProgression>();