Comment 0 for bug 1450988

Revision history for this message
David Planella (dpm) wrote : Duplicate metrics for no calls made today

I noticed that when tapping on the welcome screen, the metrics for "No calls made today"" were shown twice. That is:

1. Tap on the circle until you see "No calls made today""
2. Double tap again

Actual:
 - The same "No calls made today"" text is shown, but with a different diagram

Expected:
- "No time spent on calls today" (or similar) is shown

I think it just needs a one-liner change on this code in indicator/metrics.cpp [1]. I would suggest "No time spent on calls today" on the second instance.

This will also need a .pot file update to expose the new string to translators.

        mMetrics[OutgoingCalls] = mMetricManager->add(MetricParameters(DIALER_OUTGOING_STATISTICS_ID).formatString(GettextMarkExtraction("<b>%1</b> calls made today"))
                                                      .emptyDataString(GettextMarkExtraction("No calls made today")).textDomain(APP_ID).minimum(0.0));
        mMetrics[CallDurations] = mMetricManager->add(MetricParameters(DIALER_CALL_DURATION_STATISTICS_ID).formatString(GettextMarkExtraction("Spent <b>%1</b> minutes in calls today"))
                                                      .emptyDataString(GettextMarkExtraction("No calls made today")).textDomain(APP_ID).minimum(0.0));

[1] http://bazaar.launchpad.net/~phablet-team/telephony-service/trunk/view/head:/indicator/metrics.cpp#L48