Ver Fonte

made showRatings true by default

Akira Laine há 9 anos atrás
pai
commit
f8bdf31b84
2 ficheiros alterados com 6 adições e 3 exclusões
  1. 4 1
      app/client/scripts/events.js
  2. 2 2
      app/server/server.js

+ 4 - 1
app/client/scripts/events.js

@@ -1615,7 +1615,10 @@ Template.room.events({
 // Settings Template
 Template.settings.events({
     "click #save-settings": function() {
-        Meteor.call("updateSettings", $("#showRating").is(":checked"));
+        Meteor.call("updateSettings", $("#showRating").is(":checked"), function(err,res){
+            var $toastContent = $('<span><strong>Settings Saved!</strong> No errors were found.</span>');
+            Materialize.toast($toastContent, 3000);
+        });
     },
     "click #delete-account": function(){
         $("#delete-account").text("Click to confirm");

+ 2 - 2
app/server/server.js

@@ -462,7 +462,7 @@ Accounts.onCreateUser(function (options, user) {
         rank: "default",
         liked: [],
         disliked: [],
-        settings: {showRating: false},
+        settings: {showRating: true},
         realname: ""
     };
     return user;
@@ -730,7 +730,7 @@ Meteor.methods({
         if (Meteor.userId() && !isBanned()) {
             var user = Meteor.user();
             if (showRating !== true && showRating !== false) {
-                showRating = false;
+                showRating = true;
             }
             if (user.profile.settings) {
                 Meteor.users.update({"profile.username": user.profile.username}, {$set: {"profile.settings.showRating": showRating}});