Skip to content

Commit

Permalink
added flashOptions object to clear up code
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Connis committed Nov 8, 2017
1 parent 6116285 commit 00eb1dc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/services/project-user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default Service.extend({
currentUser: service(),
flashMessages: service(),
store: service(),
flashOptions: { fixed: true, sticky: false, timeout: 5000 },

This comment has been minimized.

Copy link
@joshsmith

joshsmith Nov 9, 2017

Contributor

Would add a line break before the ‘flashOptions’.

joinProject(project) {
let user = get(this, 'currentUser.user');
Expand All @@ -19,12 +20,10 @@ export default Service.extend({
},

_flashSuccess(message) {
let options = { fixed: true, sticky: false, timeout: 5000 };
get(this, 'flashMessages').clearMessages().success(message, options);
get(this, 'flashMessages').clearMessages().success(message, get(this, 'flashOptions'));
},

_flashError(message) {
let options = { fixed: true, sticky: false, timeout: 5000 };
get(this, 'flashMessages').clearMessages().danger(message, options);
get(this, 'flashMessages').clearMessages().danger(message, get(this, 'flashOptions'));
}
});

0 comments on commit 00eb1dc

Please sign in to comment.