mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-11 12:12:55 +00:00
fix: detail view should not reuse things without references
This commit is contained in:
@@ -93,6 +93,11 @@ export class DataDetailComponent implements OnInit {
|
|||||||
translateService: TranslateService,
|
translateService: TranslateService,
|
||||||
) {
|
) {
|
||||||
this.inputItem = router.getCurrentNavigation()?.extras.state?.item;
|
this.inputItem = router.getCurrentNavigation()?.extras.state?.item;
|
||||||
|
if (!this.inputItem?.origin) {
|
||||||
|
// We received a ThingWithoutReferences.
|
||||||
|
// This can happen, for example, when detail views use `inPlace` list items
|
||||||
|
delete this.inputItem;
|
||||||
|
}
|
||||||
this.language = translateService.currentLang as SCLanguageCode;
|
this.language = translateService.currentLang as SCLanguageCode;
|
||||||
translateService.onLangChange.subscribe((event: LangChangeEvent) => {
|
translateService.onLangChange.subscribe((event: LangChangeEvent) => {
|
||||||
this.language = event.lang as SCLanguageCode;
|
this.language = event.lang as SCLanguageCode;
|
||||||
|
|||||||
@@ -228,10 +228,6 @@ export class SearchPageComponent implements OnInit {
|
|||||||
this.updateContextFilter(result.facets);
|
this.updateContextFilter(result.facets);
|
||||||
this.items = Promise.resolve(result.data);
|
this.items = Promise.resolve(result.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.items.then(it => {
|
|
||||||
if (it.length === result.pagination.total) console.log('final page loaded');
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error(error);
|
this.logger.error(error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -105,11 +105,9 @@ export class PositionService {
|
|||||||
subscriber.next(this.position);
|
subscriber.next(this.position);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
watcherID.then(console.log);
|
|
||||||
return {
|
return {
|
||||||
unsubscribe() {
|
unsubscribe() {
|
||||||
watcherID.then(id => {
|
watcherID.then(id => {
|
||||||
console.log(id);
|
|
||||||
void Geolocation.clearWatch({id});
|
void Geolocation.clearWatch({id});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user