diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-31 11:58:57 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-17 10:26:23 +0100 |
| commit | 78645253a6d55d70d70aefdf4e64c585f8e93c8c (patch) | |
| tree | da70d626a5f31111dd673fdabfc9fd52a2842fa2 /src/tagrulesdialog.h | |
| parent | 86ff3c6a66c2973a96c589151855a2d54d807236 (diff) | |
| download | qtmaildir-78645253a6d55d70d70aefdf4e64c585f8e93c8c.tar.gz qtmaildir-78645253a6d55d70d70aefdf4e64c585f8e93c8c.zip | |
fix: keep the rules banner true after Apply, delete and copy
The dialog stays open after Apply, so a refusal from a failed attempt and
the load warnings about a file Apply has just rewritten both outlived what
they described. A successful Apply rereads the file and redraws the
banner. Deleting the last rule now disables Apply, and copying or
deleting a rule re-checks which rules the sync hook will skip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'src/tagrulesdialog.h')
| -rw-r--r-- | src/tagrulesdialog.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tagrulesdialog.h b/src/tagrulesdialog.h index 1613507..f396557 100644 --- a/src/tagrulesdialog.h +++ b/src/tagrulesdialog.h @@ -98,6 +98,9 @@ public: void applyForTest() { onApply(); } /// Ticks or clears the archive box, as a click would. void setArchiveForTest(bool on); + bool applyEnabledForTest() const; + void copyRuleForTest() { onCopyRule(); } + void deleteRuleForTest() { onDeleteRule(); } /// Types into the query field and toggles the mode, so the refusal path /// can be reached without a synthetic click. The refusal reports through @@ -244,6 +247,10 @@ private: /// Enables Apply only for a rule worth applying. void updateApplyButton(); + /// Re-renders the banner when the skip sentence changed. Not called from + /// reloadList(), which runs once before the constructor's showWarnings(). + void refreshSkipWarning(); + /// The only way the warning label is written. An empty string hides it. /// One route in so the icon and the red styling cannot drift between the /// load path, the save refusal and the text-mode notice. |
