Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #22568 from empoalp/bug_1045515
Browse files Browse the repository at this point in the history
Bug 1045515 - Always highlight missed calls in call log
  • Loading branch information
rvandermeulen committed Aug 8, 2014
2 parents 0366e78 + d91e18d commit c97d1b6
Show file tree
Hide file tree
Showing 15 changed files with 4 additions and 37 deletions.
22 changes: 0 additions & 22 deletions apps/communications/dialer/js/call_log.js
Expand Up @@ -143,30 +143,9 @@ var CallLog = {
// Helper to update UI and clean notifications when we got visibility
becameVisible: function cl_becameVisible() {
this.updateHeaders();
this.updateHighlight();
this.cleanNotifications();
},

// Method for highlighting call events since last visit to call-log
updateHighlight: function cl_updateHighlight(target) {
var self = this;
var evtName = 'latestCallLogVisit';
var container = target || this.callLogContainer;
window.asyncStorage.getItem(evtName, function getItem(referenceTimestamp) {
if (referenceTimestamp) {
var logs = container.getElementsByTagName('li');
for (var i = 0, l = logs.length; i < l; i++) {
if (logs[i].dataset.timestamp > referenceTimestamp) {
logs[i].classList.add('highlighted');
} else {
logs[i].classList.remove('highlighted');
}
}
}
window.asyncStorage.setItem(evtName, Date.now());
});
},

// Method for updating the time in headers based on device time
updateHeaders: function cl_updateHeaders() {
var headers = this.callLogContainer.getElementsByTagName('header');
Expand Down Expand Up @@ -272,7 +251,6 @@ var CallLog = {
phoneNumbers.push(current.number);
}

this.updateHighlight(callLogSection);
this.callLogContainer.appendChild(callLogSection);

// If the contacts cache is not valid, we retrieve the contacts information
Expand Down
18 changes: 4 additions & 14 deletions apps/communications/dialer/style/call_log.css
Expand Up @@ -167,22 +167,12 @@ ol, ul {
}

[data-type="list"] aside.icon.icon-missed {
background-image: url('images/CallLog_30x30_missed_grey.png');
}
[data-type="list"].dual-sim aside.icon.icon-missed.first-sim {
background-image: url('images/CallLog_30x30_missed_grey-first-sim.png');
}
[data-type="list"].dual-sim aside.icon.icon-missed.second-sim {
background-image: url('images/CallLog_30x30_missed_grey-second-sim.png');
}

[data-type="list"] .missed-call.highlighted aside.icon.icon-missed {
background-image: url('images/CallLog_30x30_missed.png');
}
[data-type="list"].dual-sim .missed-call.highlighted aside.icon.icon-missed.first-sim {
[data-type="list"].dual-sim aside.icon.icon-missed.first-sim {
background-image: url('images/CallLog_30x30_missed-first-sim.png');
}
[data-type="list"].dual-sim .missed-call.highlighted aside.icon.icon-missed.second-sim {
[data-type="list"].dual-sim aside.icon.icon-missed.second-sim {
background-image: url('images/CallLog_30x30_missed-second-sim.png');
}

Expand Down Expand Up @@ -222,8 +212,8 @@ ol, ul {
pointer-events: auto;
}

.log-item.missed-call.highlighted .call-time {
color: #b90000 !important;
.log-item.missed-call .call-time {
color: #b90000;
}

.log-item .pack-checkbox {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion build/csslint/xfail.list
Expand Up @@ -16,7 +16,6 @@ apps/costcontrol/style/views/balance.css 0 2
apps/costcontrol/style/app.css 0 3
apps/keyboard/style/keyboard.css 1 3
apps/callscreen/style/oncall.css 0 2
apps/communications/dialer/style/call_log.css 0 1
apps/communications/dialer/style/dialer.css 0 3
apps/communications/dialer/style/toolbar.css 0 1
apps/communications/contacts/style/overlay.css 0 1
Expand Down

0 comments on commit c97d1b6

Please sign in to comment.