Bug 1162903: use favicons as Loop conversation context thumbnails and store them as base64 encoded data-uris. r=Standard8

This commit is contained in:
Mike de Boer
2015-05-14 12:57:05 +01:00
parent 5442b76536
commit 01b8e29559
8 changed files with 90 additions and 23 deletions

View File

@@ -717,19 +717,23 @@ loop.panel = (function(_, mozL10n) {
onDocumentVisible: function() {
this.props.mozLoop.getSelectedTabMetadata(function callback(metadata) {
var previewImage = metadata.previews.length ? metadata.previews[0] : "";
var previewImage = metadata.favicon || "";
var description = metadata.description || metadata.title;
var url = metadata.url;
this.setState({previewImage: previewImage,
description: description,
url: url});
this.setState({
previewImage: previewImage,
description: description,
url: url
});
}.bind(this));
},
onDocumentHidden: function() {
this.setState({previewImage: "",
description: "",
url: ""});
this.setState({
previewImage: "",
description: "",
url: ""
});
},
onCheckboxChange: function(event) {