diff --git a/frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.ts b/frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.ts index a231e6946a..415e25071d 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.ts @@ -123,7 +123,7 @@ export class WorkPackagesListComponent extends WorkPackagesViewBase implements O this.currentQuery = query; // Update the visible representation - if (this.wpDisplayRepresentation.valueFromQuery(query) === wpDisplayCardRepresentation) { + if (this.deviceService.isMobile || this.wpDisplayRepresentation.valueFromQuery(query) === wpDisplayCardRepresentation) { this.showListView = false; } else { this.showListView = true; diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/work-packages-view.base.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/work-packages-view.base.ts index c03ac6d8f8..cce0d18c1e 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/work-packages-view.base.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/work-packages-view.base.ts @@ -55,6 +55,7 @@ import {WorkPackageViewDisplayRepresentationService} from "core-app/modules/work import {HalEvent, HalEventsService} from "core-app/modules/hal/services/hal-events.service"; import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import {DeviceService} from "core-app/modules/common/browser/device.service"; export abstract class WorkPackagesViewBase implements OnInit, OnDestroy { @@ -83,6 +84,7 @@ export abstract class WorkPackagesViewBase implements OnInit, OnDestroy { readonly cdRef:ChangeDetectorRef = this.injector.get(ChangeDetectorRef); readonly wpDisplayRepresentation:WorkPackageViewDisplayRepresentationService = this.injector.get(WorkPackageViewDisplayRepresentationService); readonly halEvents:HalEventsService = this.injector.get(HalEventsService); + readonly deviceService:DeviceService = this.injector.get(DeviceService); constructor(protected injector:Injector) {