2014-11-09 11:17:26 +01:00
|
|
|
/*global $, Whisper, Backbone, textsecure, extension*/
|
2015-09-07 23:53:43 +02:00
|
|
|
/*
|
|
|
|
* vim: ts=4:sw=4:expandtab
|
2014-05-04 08:34:13 +02:00
|
|
|
*/
|
2014-11-09 11:17:26 +01:00
|
|
|
(function () {
|
2014-11-17 00:30:40 +01:00
|
|
|
'use strict';
|
2014-05-04 08:34:13 +02:00
|
|
|
|
2014-11-17 00:30:40 +01:00
|
|
|
window.Whisper = window.Whisper || {};
|
2015-05-11 23:22:15 +02:00
|
|
|
|
|
|
|
extension.windows.getBackground(function(bg) {
|
|
|
|
if (bg.textsecure.storage.user.getNumber() === undefined) {
|
|
|
|
window.location = '/options.html';
|
|
|
|
} else {
|
2015-05-21 22:05:52 +02:00
|
|
|
extension.windows.getCurrent(function(appWindow) {
|
2015-09-05 03:33:14 +02:00
|
|
|
var view = new bg.Whisper.InboxView({appWindow: appWindow});
|
|
|
|
view.$el.prependTo(bg.$('body',document));
|
|
|
|
window.openConversation = function(conversation) {
|
|
|
|
if (conversation) {
|
|
|
|
view.openConversation(null, {conversation: conversation});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
openConversation(bg.getOpenConversation());
|
2015-05-21 22:05:52 +02:00
|
|
|
});
|
2015-05-11 23:22:15 +02:00
|
|
|
}
|
|
|
|
});
|
2014-11-09 11:17:26 +01:00
|
|
|
}());
|