mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 787272. Disable recommend button on logout. r=jaws
This commit is contained in:
parent
207baefbc9
commit
f579da83d9
@ -308,6 +308,8 @@ let SocialShareButton = {
|
||||
updateProfileInfo: function SSB_updateProfileInfo() {
|
||||
let profileRow = document.getElementById("editSharePopupHeader");
|
||||
let profile = Social.provider.profile;
|
||||
this.promptImages = null;
|
||||
this.promptMessages = null;
|
||||
if (profile && profile.displayName) {
|
||||
profileRow.hidden = false;
|
||||
let portrait = document.getElementById("socialUserPortrait");
|
||||
@ -316,12 +318,12 @@ let SocialShareButton = {
|
||||
displayName.setAttribute("label", profile.displayName);
|
||||
} else {
|
||||
profileRow.hidden = true;
|
||||
this.updateButtonHiddenState();
|
||||
return;
|
||||
}
|
||||
// XXX - this shouldn't be done as part of updateProfileInfo, but instead
|
||||
// whenever we notice the provider has changed - but the concept of
|
||||
// "provider changed" will only exist once bug 774520 lands.
|
||||
this.promptImages = null;
|
||||
this.promptMessages = null;
|
||||
// get the recommend-prompt info.
|
||||
let port = Social.provider._getWorkerPort();
|
||||
if (port) {
|
||||
@ -388,7 +390,8 @@ let SocialShareButton = {
|
||||
updateButtonHiddenState: function SSB_updateButtonHiddenState() {
|
||||
let shareButton = this.shareButton;
|
||||
if (shareButton)
|
||||
shareButton.hidden = !Social.uiVisible || this.promptImages == null;
|
||||
shareButton.hidden = !Social.uiVisible || this.promptImages == null ||
|
||||
!Social.provider.profile || !Social.provider.profile.userName;
|
||||
},
|
||||
|
||||
onClick: function SSB_onClick(aEvent) {
|
||||
|
Loading…
Reference in New Issue
Block a user