Use "const" where possible

Increase readability by using "const" for identifiers that will not be reassigned
This commit is contained in:
Rafostar
2021-01-05 20:13:53 +01:00
parent f6601766f1
commit 3452990c28
21 changed files with 320 additions and 321 deletions

View File

@@ -4,7 +4,7 @@ const { HeaderBar } = imports.clapper_src.headerbar;
const { Widget } = imports.clapper_src.widget;
const Debug = imports.clapper_src.debug;
let { debug } = Debug;
const { debug } = Debug;
var App = GObject.registerClass(
class ClapperApp extends AppBase
@@ -27,13 +27,13 @@ class ClapperApp extends AppBase
this.active_window.isClapperApp = true;
this.active_window.add_css_class('nobackground');
let clapperWidget = new Widget();
const clapperWidget = new Widget();
this.active_window.set_child(clapperWidget);
let headerBar = new HeaderBar(this.active_window);
const headerBar = new HeaderBar(this.active_window);
this.active_window.set_titlebar(headerBar);
let size = clapperWidget.windowSize;
const size = clapperWidget.windowSize;
this.active_window.set_default_size(size[0], size[1]);
debug(`restored window size: ${size[0]}x${size[1]}`);
}
@@ -62,7 +62,7 @@ class ClapperApp extends AppBase
if(!this.playlist.length)
return;
let { player } = window.get_child();
const { player } = window.get_child();
player.set_playlist(this.playlist);
}
});