Add TODO file showing what still needs to be done
This commit is contained in:
parent
138581701c
commit
1137f9d711
3 changed files with 16 additions and 7 deletions
9
TODO.txt
Normal file
9
TODO.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
TODOs in no particular order
|
||||
============================
|
||||
|
||||
* Support group messaging
|
||||
* Refactor helpers.js into more files
|
||||
* Min-ify js-deps into fewer files
|
||||
* Support attachments
|
||||
* Propose multi-device protos/protocol to upstream, support it here
|
||||
* Fix storage of sent messages/refactor UI a bit to show conversations, not messages
|
|
@ -22,10 +22,9 @@ registerOnLoadFunction(function() {
|
|||
subscribeToPush(function(message) {
|
||||
console.log("Got message from " + message.pushMessage.source + "." + message.pushMessage.sourceDevice +
|
||||
': "' + getString(message.message.body) + '"');
|
||||
var newUnreadCount = storage.getUnencrypted("unreadCount") + 1;
|
||||
var newUnreadCount = storage.getUnencrypted("unreadCount", 0) + 1;
|
||||
storage.putUnencrypted("unreadCount", newUnreadCount);
|
||||
chrome.browserAction.setBadgeText({text: newUnreadCount + ""});
|
||||
storeMessage(message);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -309,7 +309,7 @@ function storeMessage(messageObject) {
|
|||
var messageMap = getMessageMap();
|
||||
var conversation = messageMap[messageObject.pushMessage.source]; //TODO: Also support Group message IDs here
|
||||
if (conversation === undefined) {
|
||||
conversation = []
|
||||
conversation = [];
|
||||
messageMap[messageObject.pushMessage.source] = conversation;
|
||||
}
|
||||
|
||||
|
@ -937,11 +937,11 @@ var crypto_tests = {};
|
|||
|
||||
|
||||
// message_callback(decoded_protobuf) (use decodeMessage(proto))
|
||||
var subscribeToPushMessageSemaphore = 1;
|
||||
var subscribeToPushMessageSemaphore = 0;
|
||||
function subscribeToPush(message_callback) {
|
||||
subscribeToPushMessageSemaphore++;
|
||||
if (subscribeToPushMessageSemaphore <= 0)
|
||||
return;
|
||||
subscribeToPushMessageSemaphore--;
|
||||
|
||||
var user = storage.getUnencrypted("number_id");
|
||||
var password = storage.getEncrypted("password");
|
||||
|
@ -954,13 +954,13 @@ function subscribeToPush(message_callback) {
|
|||
socket.onerror = function(socketEvent) {
|
||||
console.log('Server is down :(');
|
||||
clearInterval(pingInterval);
|
||||
subscribeToPushMessageSemaphore++;
|
||||
subscribeToPushMessageSemaphore--;
|
||||
setTimeout(function() { subscribeToPush(message_callback); }, 60000);
|
||||
};
|
||||
socket.onclose = function(socketEvent) {
|
||||
console.log('Server closed :(');
|
||||
clearInterval(pingInterval);
|
||||
subscribeToPushMessageSemaphore++;
|
||||
subscribeToPushMessageSemaphore--;
|
||||
setTimeout(function() { subscribeToPush(message_callback); }, 60000);
|
||||
};
|
||||
socket.onopen = function(socketEvent) {
|
||||
|
@ -994,6 +994,7 @@ function subscribeToPush(message_callback) {
|
|||
|
||||
try {
|
||||
crypto.handleIncomingPushMessageProto(proto, function(decrypted) {
|
||||
storeMessage(decrypted);
|
||||
message_callback(decrypted);
|
||||
}); // Decrypts/decodes/fills in fields/etc
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in a new issue