mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 16:31:58 +02:00
Use "const" where possible
Increase readability by using "const" for identifiers that will not be reassigned
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user