gnome-github-notifications
gnome-github-notifications copied to clipboard
Port libsoup3
I am currently on gnome shell 43.0 binded to libsoup3 gir on Debian and it works. It also works on a Debian install with gnome-shell 42.4 binded to libsoup 2.4.
But there are blind spots in the error paths:
- in:
body = this.httpSession.send_and_read_finish(result, err);
if (!body) {
error('Body is null: ' + err);
I do not know if the err (a GError) is converted to a string properly on error, I guessed. Also, the 'Body is null' prefix might not be the best.
- I converted blindly:
error('result error: ' + JSON.stringify(response));
toerror('result error: ' + JSON.stringify(result));
I do not know what a GAsyncResult stringified will become. The issue is I do not know how it worked before with a SoupMessage.
So it is in a "works for me" form. As those changes are specific to the libsoup3 code paths maybe it could be merged and those issues handled when those code paths are triggered.
Both previous issues are fixed. The part about the body is obsolete (I found that gerror are exceptions in javascript, which is at the same time obvious and nowhere documented). And I replaced the JSON.stringify of the result object with two stringify: one of response and the other of the body (that was previously a subfield of response).
This would fix #51 right?
@dveeden yes it fixes #51 thus why there a subcommit to add gnome shell 43 compatibility. Cheers
Would love to see this PR merged :) Thanks @prahal
Working in Gnome43 (manjaro version) @alexduf could we have this merged please? EDIT: And thanks @prahal to get this working =D
I have been using this as a PKGBUILD for 11 days now, it's has been working flawlessly. I would love to see this merged.
The only issue is that, if the notifications cannot be grabbed (e.g. the token being invalid, expired or missing, or the device being offline), notifications count will be shown as "0" instead of "!" (i.e. the previous behavior).
BTW, good job! Thanks!
There's also another issue happening here. The notifications count doesn't update at the interval and regularly (e.g. every one minute), but only when I reload the extension or make a login (e.g. after locking the screen). Kinda weird.
There's also another issue happening here. The notifications count doesn't update at the interval and regularly (e.g. every one minute), but only when I reload the extension or make a login (e.g. after locking the screen). Kinda weird.
I noticed the same, many times it took a lot to update (0 => N or N => 0...) I didn't dig into it yet..
@prahal It appears that the current maintainer is no longer active. I believe it would be beneficial to maintain the forked version. Would you be interested in taking on this responsibility?
@git-Hmmm I cannot spend the time to maintain a proper fork (published on extensions.gnome.org). Mainly because currently I invest time in a few other projects. But I could maintain an initial code fork on GitHub with an issue tracker. Maybe later on I could publish the extension with proper metadata for a fork on extensions.gnome.org.
@git-Hmmm also note that a maintained fork already exists. https://github.com/mackdk/gnome-github-manager . Maybe it would be better to check if it supports libsoup3 and else port my patch to it than starting a new fork.
@prahal Thanks for the info. I will checkout this fork.