feat: implement UnifiedPush on Linux#2541
Conversation
bc8e299 to
01c200b
Compare
|
I'm having some trouble testing it on my phone, mainly due to not being able to build an arm64 version from my x86_64 host. I'm looking into https://github.com/TheAppgineer/flatpak-flutter to make this easier (and just build it directly on my phone). |
01c200b to
a05f58e
Compare
|
Wow that is great! Thank you so much :-) can't wait to try this out |
| flutter_webrtc: ^1.2.1 | ||
| geolocator: ^14.0.2 | ||
| go_router: ^17.0.1 | ||
| handy_window: ^0.4.0 |
There was a problem hiding this comment.
Is this package somehow producing problems here? That would be sad as it makes the app afaik easier integrated into linux mobile
There was a problem hiding this comment.
Yes, unfortunately its changes to GTK handling seem to conflict with running Flutter headless which is needed for background notifications.
Out of curiosity, do you know how handy_window affects Linux mobile? I am running a build with all my MRs merged on my own phone, and have not yet noticed any regressions.
I am running GNOME Mobile and cannot easily test other interfaces, so perhaps it's important for other UIs?
There was a problem hiding this comment.
I only have heard it from other users but that's already years ago so maybe it is fixed now. I don't have a Linux mobile device for myself to test it. So if it works for you it is probably fixed. However it's still a little bit sad that this removes the rounded corners at the bottom of the window :-/ it looks so much more modern and it's not in sight that canonical develops a gtk4 port soon... However that would something we could life with I guess
There was a problem hiding this comment.
I'll try to see if I can find a way to make it work. I am currently struggling a lot with getting notifications in the background. I can start the app when a UP message comes through, but it never sends a notif.
There was a problem hiding this comment.
There was a new package of handy_window. Does that help in some case?
d65c19e to
c5bd78b
Compare
|
I've been running a Flatpak built with all my open merge requests, and sometimes upon starting FluffyChat I get an error about the SQLite database being already in use, and the app opens to a black window. If I close and reopen it, I am shown the login screen and I have to re-login to my account (and verify my session). This sucks, and we cannot merge this until that's fixed. I would really appreciate some help! |
c5bd78b to
4547501
Compare
4547501 to
44c627f
Compare
|
Any updates on this? |
|
Well it works, I run all my patches on my phone, but it has the issue with the SQLite database causing me to have to relog every day or so. Still waiting for help with that. |
Thank you so much for your contribution to FluffyChat ❤️❤️❤️
Pull Request has been tested on:
I decided to give it a go myself, just following the UnifiedPush Flutter connector's implementation (got a lot of help from their devs). The app will try to register on launch (like on Android) and give a dismissable message if not. If there are no available distributors, it will fallback to the old local notifications, otherwise everything goes through UnifiedPush. I mirrored most of the implementation from
local_notifications_extensiontopush_helper, though it is quite annoying we have a duplicated impl for this (using different libraries).Starting in the background is automatically handled for us by the UP library, it sets up a dbus activatable service that launches FluffyChat with a new flag
--unifiedpush-bg, which causes it to take the same codepath as Android. Additionally, the env varFLUTTER_HEADLESSis defined and handled on the GTK/C side, as otherwise a black window opens for a couple seconds before UP can trigger hiding it.Likely some polish is needed, but it's a start, and a very important feature for those of us running FluffyChat on Linux mobile. I am happy to make any changes, please let me know :)
Fixes #486