Fix profile not updating the user name
This commit is contained in:
@@ -660,8 +660,8 @@ define([
|
|||||||
});
|
});
|
||||||
});*/
|
});*/
|
||||||
}
|
}
|
||||||
if (store.profile) {
|
if (store.modules['profile']) {
|
||||||
store.profile.setName(value);
|
store.modules['profile'].setName(value);
|
||||||
}
|
}
|
||||||
store.proxy[Constants.displayNameKey] = value;
|
store.proxy[Constants.displayNameKey] = value;
|
||||||
broadcast([clientId], "UPDATE_METADATA");
|
broadcast([clientId], "UPDATE_METADATA");
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ define([
|
|||||||
|
|
||||||
var setName = function (ctx, value, cb) {
|
var setName = function (ctx, value, cb) {
|
||||||
cb = cb || function () {};
|
cb = cb || function () {};
|
||||||
ctx.profile.name = value;
|
ctx.listmap.proxy.name = value;
|
||||||
Realtime.whenRealtimeSyncs(ctx.listmap.realtime, function () {
|
Realtime.whenRealtimeSyncs(ctx.listmap.realtime, function () {
|
||||||
if (!ctx.listmap) { return; }
|
if (!ctx.listmap) { return; }
|
||||||
ctx.emit('UPDATE', ctx.listmap.proxy, ctx.clients);
|
ctx.emit('UPDATE', ctx.listmap.proxy, ctx.clients);
|
||||||
@@ -123,8 +123,6 @@ define([
|
|||||||
|
|
||||||
ctx.profile = store.proxy.profile = store.proxy.profile || {};
|
ctx.profile = store.proxy.profile = store.proxy.profile || {};
|
||||||
|
|
||||||
console.log(ctx.profile);
|
|
||||||
|
|
||||||
initializeProfile(ctx, waitFor(function (err) {
|
initializeProfile(ctx, waitFor(function (err) {
|
||||||
if (err) { return; }
|
if (err) { return; }
|
||||||
openChannel(ctx);
|
openChannel(ctx);
|
||||||
|
|||||||
@@ -930,7 +930,7 @@ MessengerUI, Messages) {
|
|||||||
$userButton.click(function (e) {
|
$userButton.click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
var myData = metadataMgr.getMetadata().users[metadataMgr.getNetfluxId()];
|
var myData = metadataMgr.getUserData();
|
||||||
var lastName = myData.name;
|
var lastName = myData.name;
|
||||||
UI.prompt(Messages.changeNamePrompt, lastName || '', function (newName) {
|
UI.prompt(Messages.changeNamePrompt, lastName || '', function (newName) {
|
||||||
if (newName === null && typeof(lastName) === "string") { return; }
|
if (newName === null && typeof(lastName) === "string") { return; }
|
||||||
|
|||||||
Reference in New Issue
Block a user