applets/notifications: Hide the speed line only when the chart shows it

Original commit message(s)

  • applets/notifications: Do not count the files twice

The text of a job notification reads "16,818 of 3,591,635 files to Backup/Backups", and the details under it repeated the same pair of numbers without the destination.

Leave out the row that the text has already counted, which the job now names.

  • libnotificationmanager: Expose which amount the job text counts

text() counts files, or items, or neither, depending on what the job reports. A view that shows the text and the amounts of the job together has no way of knowing which of the two it is about to print a second time.

Job::textAmount() names it, and text() reads it, so the two cannot come apart.

  • applets/notifications: Hide the average speed until there is one

The average is the processed bytes over the elapsed time, and a job that reports no elapsed time has none. Such a job showed "Average Speed 0 B/s" in the chart legend beside a speed of tens of megabytes a second.

  • applets/notifications: Hide the speed line only when the chart shows it

The speed line under Details hid itself when the job reported a percentage and an elapsed time, taking that for the chart being drawn. The chart is drawn on two readings and an expanded Details section instead, so the two conditions do not agree. An application that reports no elapsed time shows its speed twice, in the chart legend and again under Details, and a job with fewer than two readings showed it in neither.

SpeedChart now says whether it is drawing, and the line follows that.

Reason for the change

Test plan

Before:

Capture_d_écran_20260913_112441

After:

Capture_d_écran_20260914_104103

Screenshots or screen recordings

Bugs fixed

Edited by Méven Car

Merge request reports

Loading
Loading