Draw attention to windows on new messages

This commit is contained in:
lilia 2015-05-20 15:50:03 -07:00
parent 0b31823989
commit 12eb553a3f
2 changed files with 10 additions and 1 deletions

View file

@ -141,6 +141,12 @@
} else { } else {
window.addEventListener('beforeunload', callback); window.addEventListener('beforeunload', callback);
} }
},
drawAttention: function(window_id) {
if (chrome.app.window) {
chrome.app.window.get(window_id).drawAttention();
}
} }
}; };

View file

@ -65,7 +65,10 @@
}); });
conversation.fetchMessages(); conversation.fetchMessages();
} else { } else {
openConversation(message.get('conversationId')); var conversationId = message.get('conversationId');
openConversation(conversationId);
var windowId = windowMap.windowIdFrom(conversationId);
extension.windows.drawAttention(windowId);
} }
}; };