From 97a4af51b8245559b37e1aeea0a4fdbc8f2d68d7 Mon Sep 17 00:00:00 2001 From: Nihanth Subramanya Date: Mon, 14 Jul 2014 04:02:32 +0530 Subject: [PATCH] Bug 1037974 - [Regression] Awesometab doesn't rank MUCs properly. r=aleth --- im/components/ibConvStatsService.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/im/components/ibConvStatsService.js b/im/components/ibConvStatsService.js index 374de8bef0..65b3714837 100644 --- a/im/components/ibConvStatsService.js +++ b/im/components/ibConvStatsService.js @@ -152,16 +152,16 @@ ConvStatsService.prototype = { OS.Path.join(OS.Constants.Path.profileDir, "statsservicecache.json"); OS.File.read(this._statsCacheFilePath).then(function(aArray) { try { - let {version: version, stats: stats} = + let {version: version, stats: allStats} = JSON.parse((new TextDecoder()).decode(aArray)); if (version !== gStatsCacheVersion) { gLogParser.sweep(this); return; } - gStatsByConvId = stats; - for each (let stats in gStatsByConvId) { - stats = new ConversationStats(stats.id, stats.lastDate, - stats.incomingCount, stats.outgoingCount); + for each (let stats in allStats) { + gStatsByConvId[stats.id] = + new ConversationStats(stats.id, stats.lastDate, + stats.incomingCount, stats.outgoingCount); } gStatsByContactId = {}; }