Skip to content

Support UnifiedPush on Linux#371

Merged
jwr1 merged 6 commits intomainfrom
linux-unifiedpush
Feb 23, 2026
Merged

Support UnifiedPush on Linux#371
jwr1 merged 6 commits intomainfrom
linux-unifiedpush

Conversation

@jwr1
Copy link
Member

@jwr1 jwr1 commented Feb 18, 2026

The Flutter unifiedpush package added support for Linux a few months ago, so now we can finally support push notifications on Linux. I have the UnifiedPush storage using our database instead of the default shared preferences storage.

I have things mostly working, but unfortunately, there is an issue where once a notification is received in the background the first time, it will display correctly, but on subsequent notifications, it will no longer work. It seems like the app is staying open in the background and not closing properly after handling the notification.

@jwr1
Copy link
Member Author

jwr1 commented Feb 18, 2026

@olorin99, could you try testing this on your computer and see if you can reproduce the issue? You'll want to set up kunifiedpush if you haven't already.

@olorin99
Copy link
Contributor

Could reproduce. This commit seemed to fix it for me. Hopefully it fixes on your end too.

@jwr1
Copy link
Member Author

jwr1 commented Feb 20, 2026

It sort of works, but unfortunately, the notification displays for about half a second before disappearing (while most notifications display for 10 seconds).

I'll ask in the UnifiedPush matrix just to see if they have any ideas.

@jwr1
Copy link
Member Author

jwr1 commented Feb 20, 2026

After testing again, it seems like the issue is present, even if Interstellar is open in the foreground. That being, where the first notification will go through, but not subsequent.

@olorin99
Copy link
Contributor

Huh that's weird. The application closing shouldn't cut the notification display time. I would think that notification appearance and timing would be controlled by whatever desktop environment/notification daemon you use.

Also just tested again and with that change neither the problem with cutoff time or the subsequent notifications not going through are present on my computer. For reference I'm using niri as window manager with the dms shell displaying notifications.

@jwr1
Copy link
Member Author

jwr1 commented Feb 20, 2026

I just disabled all the notification displaying code and replaced it with logs, and everything with UnifiedPush was working correctly, so it must be related to flutter_local_notifications.

@jwr1
Copy link
Member Author

jwr1 commented Feb 20, 2026

The logs are coming in consistently every single time, but the actual displaying of the notification is extremely hit or miss. It seems like the app is fine staying open in the background for a little bit after a UP message is received because it still logs subsequent messages just fine. I can even see the "Initializing interstellar" line displayed only once with multiple "UnifiedPush message" lines afterwards. Although, we certainly don't want it running in the background forever, as that ruins the point of UnifiedPush.

So anyway, it is definitely an issue with flutterLocalNotificationsPlugin.show, but I'm really not sure what the problem would be.

@jwr1
Copy link
Member Author

jwr1 commented Feb 20, 2026

I was able to reproduce the issue by directly adding flutter_local_notifications to a flutter create project, so I'm not going to worry about the issue anymore, and hopefully they'll fix it eventually.

@jwr1 jwr1 marked this pull request as ready for review February 20, 2026 18:18
@jwr1 jwr1 requested a review from olorin99 February 20, 2026 18:18
@jwr1 jwr1 merged commit 359d304 into main Feb 23, 2026
3 checks passed
@jwr1 jwr1 deleted the linux-unifiedpush branch February 23, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants