Clean up inbox/compose view rendering and swapping

Templatize the inbox view and use the same pattern for in-window view
switching as is now used with the conversation/message detail views.
This means doing more with markup and less jquery manipulation of
individual subelements of the inbox view.
This commit is contained in:
lilia 2015-03-09 14:21:06 -07:00
parent fd6e2954f7
commit a72ea7966d
4 changed files with 59 additions and 57 deletions

View file

@ -22,7 +22,7 @@
if (textsecure.storage.getUnencrypted("number_id") === undefined) {
window.location = '/options.html';
} else {
new Whisper.InboxView({el: $('body')});
new Whisper.InboxView().$el.prependTo($('body'));
textsecure.storage.putUnencrypted("unreadCount", 0);
extension.navigator.setBadgeText("");
}