File tree 2 files changed +2
-10
lines changed
2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -22,19 +22,11 @@ export default class HardDiskLEDExtension extends Extension {
22
22
layoutManager = null ;
23
23
ioSpeedStaticIcon = null ;
24
24
ioSpeedIcon = null ;
25
- byteArrayToString = null ;
26
25
27
26
init ( ) {
28
27
this . cur = 0 ;
29
28
this . lastCount = 0 ;
30
29
31
- if ( global . TextDecoder ) {
32
- // available in gjs >= 1.70 (GNOME Shell >= 42)
33
- this . byteArrayToString = ( new TextDecoder ( ) . decode ) ;
34
- } else {
35
- // gjs-specific, imports.byteArray is still available in (GNOME Shell 45 >=) but discouraged!
36
- this . byteArrayToString = imports . byteArray . toString ;
37
- }
38
30
}
39
31
40
32
changeMode ( ) {
@@ -51,7 +43,7 @@ export default class HardDiskLEDExtension extends Extension {
51
43
let input_file = Gio . file_new_for_path ( '/proc/diskstats' ) ;
52
44
53
45
let [ , contents , _etag ] = input_file . load_contents ( null ) ;
54
- contents = this . byteArrayToString ( contents ) ;
46
+ contents = new TextDecoder ( ) . decode ( contents ) ;
55
47
let lines = contents . split ( '\n' ) ;
56
48
57
49
let count = 0 ;
Original file line number Diff line number Diff line change 8
8
],
9
9
"url" : " https://github.com/biji/harddiskled" ,
10
10
"uuid" : " harddiskled@bijidroid.gmail.com" ,
11
- "version" : 36
11
+ "version" : 37
12
12
}
You can’t perform that action at this time.
0 commit comments