mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
cleanup: Use arrow notation for anonymous functions
Arrow notation is great, use it consistently through-out the code base
to bind `this` to anonymous functions, replacing the more overbose
Lang.bind(this, function() {}).
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
This commit is contained in:
parent
76f09b1e49
commit
213e38c2ef
105 changed files with 2165 additions and 2408 deletions
|
|
@ -143,7 +143,7 @@ function loadRemoteSearchProviders(searchSettings, callback) {
|
|||
// Special case gnome-control-center to be always active and always first
|
||||
sortOrder.unshift('gnome-control-center.desktop');
|
||||
|
||||
loadedProviders = loadedProviders.filter(function(provider) {
|
||||
loadedProviders = loadedProviders.filter(provider => {
|
||||
let appId = provider.appInfo.get_id();
|
||||
|
||||
if (provider.defaultEnabled) {
|
||||
|
|
@ -155,7 +155,7 @@ function loadRemoteSearchProviders(searchSettings, callback) {
|
|||
}
|
||||
});
|
||||
|
||||
loadedProviders.sort(function(providerA, providerB) {
|
||||
loadedProviders.sort((providerA, providerB) => {
|
||||
let idxA, idxB;
|
||||
let appIdA, appIdB;
|
||||
|
||||
|
|
@ -240,8 +240,8 @@ var RemoteSearchProvider = new Lang.Class({
|
|||
if (results.length <= maxNumber)
|
||||
return results;
|
||||
|
||||
let regularResults = results.filter(function(r) { return !r.startsWith('special:'); });
|
||||
let specialResults = results.filter(function(r) { return r.startsWith('special:'); });
|
||||
let regularResults = results.filter(r => !r.startsWith('special:'));
|
||||
let specialResults = results.filter(r => r.startsWith('special:'));
|
||||
|
||||
return regularResults.slice(0, maxNumber).concat(specialResults.slice(0, maxNumber));
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue