[Pkg-mozext-commits] [personasplus] 26/76: Undo Drop down bar for "Random selection from Featured"
David Prévot
taffit at moszumanska.debian.org
Fri Aug 4 21:45:04 UTC 2017
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository personasplus.
commit 73519a0ffea6a857a21448518c660db7f96caf7b
Author: Baris Derin <baris at barisderin.com>
Date: Sat Aug 13 13:33:39 2016 +0300
Undo Drop down bar for "Random selection from Featured"
"Undo" drop down bar is displayed if "Random selection from Featured"
theme is added
---
extension/modules/service.js | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/extension/modules/service.js b/extension/modules/service.js
index 2464b8b..d7e4740 100644
--- a/extension/modules/service.js
+++ b/extension/modules/service.js
@@ -738,6 +738,22 @@ var PersonaService = {
this.selected = "random";
this._prefs.set("persona.lastChanged", new Date().getTime().toString());
this._notifyPersonaChanged(this.currentPersona);
+
+ let persona = this.currentPersona;
+ // Check whether the persona is in the favorites or the recent lists,
+ // in which case the change-notification should not be shown.
+ let recent = this.getRecentPersonas();
+ let favorites = this.favorites;
+ let inRecent = (recent && recent.some(v => v.id == persona.id));
+ let inFavorites = (favorites && favorites.some(v => v.id == persona.id));
+
+ // Show the notification if the selected persona is not in the favorite or
+ // recent lists, is not a custom persona and its author or username is not null.
+ // In this case we make sure at least one of these two fields is not null
+ // to prevent bug 526788.
+ if (!inRecent && !inFavorites && !persona.custom && (persona.author || persona.username))
+ this._showPersonaChangeNotification();
+
},
changeToRandomFavoritePersona: function() {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/personasplus.git
More information about the Pkg-mozext-commits
mailing list