fix(main-header): restore play button on mobile when time tracking is on (#7404)

Reverts d74a621d68. Hiding the play button until a task is being
tracked made starting the timer a 2-step gesture (swipe + menu) on
mobile. Users who don't want the button can already disable it via
app features.
This commit is contained in:
Johannes Millan 2026-05-01 13:13:25 +02:00
parent c457c6fb36
commit a5fb3c4a05
2 changed files with 1 additions and 12 deletions

View file

@ -4,7 +4,7 @@
<nav class="action-nav-right">
<div class="counters-action-group">
@if (isPlayButtonVisible()) {
@if (isTimeTrackingEnabled()) {
<play-button
[currentTask]="currentTask()"
[currentTaskId]="currentTaskId()"

View file

@ -45,7 +45,6 @@ import { DateService } from '../../core/date/date.service';
import { UserProfileButtonComponent } from '../../features/user-profile/user-profile-button/user-profile-button.component';
import { FocusButtonComponent } from './focus-button/focus-button.component';
import { UserProfileService } from '../../features/user-profile/user-profile.service';
import { FocusModeService } from '../../features/focus-mode/focus-mode.service';
@Component({
selector: 'main-header',
@ -85,7 +84,6 @@ export class MainHeaderComponent implements OnDestroy {
private readonly _metricService = inject(MetricService);
private readonly _dateService = inject(DateService);
private readonly _dataInitStateService = inject(DataInitStateService);
private readonly _focusModeService = inject(FocusModeService);
readonly isDataLoaded = toSignal(this._dataInitStateService.isAllDataLoadedInitially$, {
initialValue: false,
@ -158,15 +156,6 @@ export class MainHeaderComponent implements OnDestroy {
readonly isTimeTrackingEnabled = computed(() => {
return this.globalConfigService.appFeatures().isTimeTrackingEnabled;
});
readonly isPlayButtonVisible = computed(() => {
if (!this.isTimeTrackingEnabled()) {
return false;
}
if (!this.isXs()) {
return true;
}
return !!this.currentTaskId() || this._focusModeService.isSessionRunning();
});
readonly isFocusModeEnabled = computed(() => {
return this.globalConfigService.appFeatures().isFocusModeEnabled;
});