mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-17 16:37:43 +00:00
feat(issue): clear the issue-updated badge when its toggle button is clicked
The accent-colored "issue updated" indicator could previously only be cleared via the "mark as checked" button inside the issue-content panel, which renders only once the issue data (re)loads. For Plainspace tasks — and any provider whose remote issue is gone/unreachable — the data never loads, so the badge had no way to be dismissed and stayed stuck forever. Clicking the task's detail-panel toggle button while it shows the accent update icon (i.e. issueWasUpdated) now also marks the issue update as read. This is always available and does not depend on the issue data loading, so the badge can never get stuck. The manual "mark as checked" button stays. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B9SCXSQvTq8TKUL7LabJQS
This commit is contained in:
parent
1423409a13
commit
e2f0dd6925
2 changed files with 14 additions and 1 deletions
|
|
@ -248,7 +248,7 @@
|
|||
<div>
|
||||
@if (isShowToggleButton()) {
|
||||
<button
|
||||
(click)="toggleShowDetailPanel($event)"
|
||||
(click)="onToggleDetailPanelBtnClick($event)"
|
||||
title="{{ T.F.TASK.CMP.TOGGLE_DETAIL_PANEL | translate }} {{
|
||||
kb.taskToggleDetailPanelOpen
|
||||
? '[' + kb.taskToggleDetailPanelOpen + ']'
|
||||
|
|
|
|||
|
|
@ -998,6 +998,19 @@ export class TaskComponent implements OnDestroy, AfterViewInit {
|
|||
|
||||
private _wasClickedInDoubleClickRange = false;
|
||||
|
||||
// Clicking the detail-panel toggle button while it shows the accent "issue
|
||||
// updated" icon also dismisses that badge (toggleButtonIcon() === 'update'
|
||||
// iff issueWasUpdated). This is the always-available way to clear it — unlike
|
||||
// the issue-content "mark as checked" button, it does not depend on the issue
|
||||
// data (re)loading, so the badge can never get stuck (e.g. removed remote issue).
|
||||
onToggleDetailPanelBtnClick(ev?: MouseEvent): void {
|
||||
const task = this.task();
|
||||
if (task.issueWasUpdated) {
|
||||
this._taskService.markIssueUpdatesAsRead(task.id);
|
||||
}
|
||||
this.toggleShowDetailPanel(ev);
|
||||
}
|
||||
|
||||
toggleShowDetailPanel(ev?: MouseEvent): void {
|
||||
const isInTaskDetailPanel =
|
||||
this._elementRef.nativeElement.closest('task-detail-panel');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue