Open trustin opened 5 years ago
Seems this patch worked on my side too (Manjaro Gnome)...thank you!
These changes appear in #101
Thanks a lot for looking into this, and for providing the solution! Do you know how far back this works? I just want to make sure we don't break the extension on old versions.
At the moment, we claim to support Gnome Shell 3.18 to 3.30.
I personally have no idea since I'm not an expert on GNOME's extension API. Perhaps we could check some version numbers and use the old APIs only for old versions? .. because otherwise my syslog would explode :-)
@franglais125
This is new as of GJS-1.54. A simple way to handle this in backwards-compatible fashion is like so:
if (possibleByteArray instanceof Uint8Array) {
possibleByteArray = imports.byteArray.toString(possibleByteArray);
}
I'm pretty sure this how gnome-shell does it, too.
It seems like the current behavior of
UInt8Array.toString()
has been deprecated. GNOME 3.30 keeps producing a warning message about this into syslog. The following patch fixed the problem for me, but I'm not an expert on GNOME extension programming, so I'd like to leave this to the author:Note: There was one more place that calls
toString()
but I wasn't sure if it is for anUInt8Array
, so I left it as it is.