add linked unlinked maps indication

This commit is contained in:
MathieuG-P
2022-11-24 01:18:08 +01:00
parent 46f5f9486c
commit 8372d3bed9
9 changed files with 128 additions and 26 deletions
@@ -22,7 +22,6 @@ export class MapsManagerService {
}
public getMaps(version?: BSVersion): Observable<BsmLocalMap[]>{
console.log("get maps")
return new Observable(obs => {
this.ipcService.send<BsmLocalMap[], BSVersion>("get-version-maps", {args: version}).then(res => {
if(!res.success){ return obs.next(null);}
@@ -38,6 +37,13 @@ export class MapsManagerService {
});
}
public versionHaveMapsLinked(version: BSVersion): Promise<boolean>{
return this.ipcService.send<boolean, BSVersion>("verion-have-maps-linked", {args: version}).then(res => {
if(!res.success){ throw "error"; }
return res.data;
})
}
public downloadMap(map: any, version?: BSVersion){
}