diff --git a/js/index.js b/js/index.js index 6604221f7a05..4d83d960a237 100644 --- a/js/index.js +++ b/js/index.js @@ -22,7 +22,7 @@ if (textsecure.storage.getUnencrypted("number_id") === undefined) { window.location = '/options.html'; } else { - new Whisper.InboxView({el: document}); + new Whisper.InboxView({el: $('body')}); textsecure.storage.putUnencrypted("unreadCount", 0); extension.navigator.setBadgeText(""); } diff --git a/js/views/inbox_view.js b/js/views/inbox_view.js index 91c1af369826..7cfd82b492af 100644 --- a/js/views/inbox_view.js +++ b/js/views/inbox_view.js @@ -32,7 +32,10 @@ collection : this.conversations }); - this.conversations.fetchActive({reset: true}); + this.$el.addClass('loading'); + this.conversations.fetchActive({reset: true}).then(function() { + this.$el.removeClass('loading'); + }.bind(this)); extension.on('message', function(message) { this.conversations.fetch({id: message.conversationId}).then(function() { diff --git a/stylesheets/index.scss b/stylesheets/index.scss index 5761f62e23ef..5d8aef1c9f6f 100644 --- a/stylesheets/index.scss +++ b/stylesheets/index.scss @@ -2,6 +2,10 @@ margin-top: 36px; } +.loading .gutter { + // TODO: spinner +} + .contact .checkbox { display: none; }