Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a113db8e authored by Guillaume Jacquart's avatar Guillaume Jacquart
Browse files

Merge branch '3065-hide_0percent_reports' into 'main'

fix:3065: hide reports where 0% leaks where blocked.

See merge request !201
parents 502070c2 08aa6c1e
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -258,6 +258,11 @@ class WeeklyReportUseCase(
        val blockedLeaks = calls - leaks
        val blockedRate = blockedLeaks * 100 / calls

        if (blockedLeaks == 0 || blockedRate == 0) {
            // Hide cases where tracker blocking is disabled, because wordings may be confusing.
            return
        }

        val blockedRateStr = blockedRate.toString()
        val blockedLeaksStr = blockedLeaks.toString()