Skip to content

Commit

Permalink
move gifsEnabled property to chat service
Browse files Browse the repository at this point in the history
  • Loading branch information
mcfiredrill committed Sep 15, 2017
1 parent cc38157 commit 704d765
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/components/datafruits-chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ import Ember from 'ember';
export default Ember.Component.extend({
chat: Ember.inject.service(),
classNames: ['main-content'],
gifsEnabled: true,
gifsEnabled: Ember.computed.oneWay('chat.gifsEnabled'),
newMessagesBelow: false,
isJoiningChat: false,
joinedChat: Ember.computed.oneWay('chat.joinedChat'),
messages: Ember.computed.oneWay('chat.messages'),
joinedUsers: Ember.computed.oneWay('chat.joinedUsers'),
actions: {
toggleGifsEnabled(){
this.toggleProperty("gifsEnabled");
//this.toggleProperty("gifsEnabled");
this.get("chat").toggleProperty("gifsEnabled");
},
enterChat(){
this.set('isJoiningChat', true);
Expand Down
1 change: 1 addition & 0 deletions app/services/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default Ember.Service.extend({
joinedUsers: Ember.ArrayProxy.create({ content: Ember.A() }),
messages: Ember.ArrayProxy.create({ content: Ember.A() }),
joinedChat: false,
gifsEnabled: true,
push(message, object) {
this.chan.push(message, object);
},
Expand Down

0 comments on commit 704d765

Please sign in to comment.