Commit 1558a177c9abc72751f2f0137ce3f671369b2b6b
1 parent
e617844575
Fix #42. Open a 1-to-1 by tapping in a contact in group profile
Showing 1 changed file with 10 additions and 0 deletions
app/scripts/views/contact.js
View file @
1558a17
... | ... | @@ -20,6 +20,10 @@ |
20 | 20 | |
21 | 21 | contactPhoto: null, |
22 | 22 | |
23 | + events: { | |
24 | + 'click span': '_goToConversation' | |
25 | + }, | |
26 | + | |
23 | 27 | initialize: function () { |
24 | 28 | this.listenTo(this.model, 'change:state', this.render); |
25 | 29 | this.listenTo(this.model, 'change:displayName', this.render); |
... | ... | @@ -51,6 +55,12 @@ |
51 | 55 | helpers.revealEmoji(this.$el.find('dd.state')); |
52 | 56 | |
53 | 57 | return this; |
58 | + }, | |
59 | + | |
60 | + _goToConversation: function (evt) { | |
61 | + if (evt) { evt.preventDefault(); } | |
62 | + global.router.navigate('conversation/' + this.model.get('id'), | |
63 | + {trigger: true}); | |
54 | 64 | }, |
55 | 65 | |
56 | 66 | clear: function () {} |