Add user's avatar to the top left of the screen

This commit is contained in:
Scott Nonnenberg 2018-09-28 17:42:13 -07:00
parent 8f3e3b7aaf
commit a8e12d0771
8 changed files with 98 additions and 24 deletions

View file

@ -3,6 +3,8 @@
/* global getInboxCollection: false */
/* global i18n: false */
/* global Whisper: false */
/* global textsecure: false */
/* global Signal: false */
// eslint-disable-next-line func-names
(function() {
@ -93,6 +95,17 @@
// eslint-disable-next-line no-new
new Whisper.FontSizeView({ el: this.$el });
const ourNumber = textsecure.storage.user.getNumber();
const me = ConversationController.get(ourNumber);
this.mainHeaderView = new Whisper.ReactWrapperView({
className: 'main-header-wrapper',
Component: Signal.Components.MainHeader,
props: me.format(),
});
const update = () => this.mainHeaderView.update(me.format());
this.listenTo(me, 'change', update);
this.$('.main-header-placeholder').append(this.mainHeaderView.el);
this.conversation_stack = new Whisper.ConversationStack({
el: this.$('.conversation-stack'),
model: { window: options.window },