Patch: Improved notification preview

Rating: 
4.714285
Your rating: None Average: 4.7 (14 votes)

Moves a bit enlarged icon inside the notification bubble and provides settings to customize notification preview's look and behavior.

You can determine

  • Style of the preview
  • Margin and corner radius (if selected style permits)
  • Maximum and minimum width
  • Duration which the preview is shown
  • What tapping  the preview and swiping it left, right and/or down does.

No more waiting for notifications to time-out out of the way or gathering useless notifications to the events view.

Currently, removing does not work with email notifications. It has probably something to do with notification's email address headers as normally the header is the app's name.

Requires Patchmanager.

You can help translate the patch to your own language on Transifex.

Donations are welcome:

Screenshots: 
Changelog: 

* Tue Nov 6 2018 0.4.4-2

  • Fix for Sailfish 3
  • Updated Spanish translation

* Mon Oct 15 2018 0.4.4-1

  • Content margins setting
  • German translation, thanks to sail_parleur

* Mon Jun 25 2018 Thaodan <theodorstormgrade@gmail.com> 0.4.3-2 (Reverted a bit for familiarity)

  • move changelog to seperate file (recommended by Packaging/Guidelines)
  • fix building in clean build environment, because qmake5 was not installed (missing qt5-qtcore)
  • Added URL tag as suggested by rpmlint-- Shortened Summary as suggested by rpmlint

-* Fri Jun 1 2018 0.4.3-1

  • Fix for 2.2.0.29

* Fri Feb 23 2018 0.4.2-2

  • French and Russian translations, thanks to Guesnery and Ancelad

* Fri Feb 23 2018 0.4.2-1

  • Fix for 2.1.4.13

* Sat Nov 4 2017 0.4.1-4

  • Fix for 2.1.0.11 (and possibly earlier versions)

* Fri Nov 2 2017 0.4.1-2

  • Spanish translation, thanks to Caballlero

* Mon Oct 16 2017 0.4.1

  • Duration setting
  • Small fixes

* Fri Oct 13 2017 0.4

  • Settings page with lot of customation options
  • Bugfixes

* Tue Jul 25 2017 0.3

  • Soft corner only if it doesn't face the side of the screen
  • Notification preview's width is determined by the body text
  • Mimimum preview width is 80% of the portrait-screen-width
  • Maximum is full screen width

* Sat Jul 15 2017 0.2

  • Changed patch for overall notification preview improvement patch.
  • Portrait-screen-wide notification
  • Icon moved inside notification bubble and enlarged
  • Reduced the margins restricting preview texts a bit

* Sat Jul 15 2017 0.1

  • First build.

Comments

superyuan's picture

thank you for your amaxing work. I updated systrm to 3.0.0.8 but the patch malfunctioned . now it is stuck that can not use patch manager to uninstall, and unable to install te new patch versions. do you have a sudo command to force to uninstall it completely and so i could reinstall it fresh?

dfstorm's picture

It worked ! Thanks :)

dfstorm's picture

And it fail to install in patchmanger 3 on 3.0.0.5 :(

Ingvix's picture

Fixed.

naytsyrhc's picture

Awesome. Thanks for the quick fix.

dfstorm's picture

Sailfish X 2.2.1.18 here and I most say: thank you. Very good work.

olf's picture

v0.4.4 and v0.4.3 do install fine under SFOS 2.1.4, but fail to apply in Patchmanager. Reverting to v0.4.2-2 resolved this.
You may adapt the RPM spec file to the least supported SFOS version (e.g.: "Requires: sailfish-version >= 2.2.0").

Ingvix's picture

Yes. I recalled doing that but it seems I didn't or did not save the changes. The present version works only for 2.2.0.29 and up as it changed the notification preview a lot. I'll fix it soon.

lkraav's picture

Is it possible to get a padding slider for more spacing *inside* the box?

Thaodan's picture

Did you pushed very change to github?

I want to update to 2.2.x (only small changes needed).

Ingvix's picture

I'm currently updating the patch. Update for 2.2 probably comes today.

Noerde's picture

When would the update be available? Or does the old version still work?

Ingvix's picture

I having troubles connecting with my build engine so can't really say for sure. Could be tomorrow, could be sometime next week. I have the update ready but can't build it.

Thaodan's picture

Did you forgot to push or do you no push on github anymore?

Ingvix's picture

Yes, it seems I forgot to update the github repository. I pushed it now but don't bother with pull request. I have the fix ready in moment.

saba's picture

No. I only installed it yesterday. The last update i did was from 2.1.4.13 to 2.1.4.14 2 days ago.

Ingvix's picture

That sounds odd. If you are familiar with terminal, could you run command

tail -f "/var/lib/patchmanager/ausmt/ausmt.log"

and leave it running and then try to unapply the patch. Copy the command output and upload it to pastebin.com and give me a link

If you're not too familiar with terminal, after unapplying you can just to the file "/var/lib/patchmanager/ausmt/ausmt.log" and from the end of the file and copy the last logging starting with:

sailfishos-patch-improved-notification-preview
  contains text patch

and pastebin that.

Noerde's picture

I have the same error. Can't uninstall the patch. But I forgot /the automatic remove didn't work when I installed .4.13, now .4.14 won't install as patchmanager tries to uninstall all patches first - and failing.

https://pastebin.com/Prtns04e

Ingvix's picture

Easiest fix would be to first remove the file "/usr/share/lipstick-jolla-home-qt5/notifications/NotificationPreview.qml.webosinternals.orig" then in the same directory rename "NotificationPreview.qml" to "NotificationPreview.qml.webosinternals.orig" then create a new "NotificationPreview.qml" and paste this in it.

@sada, this might be the fix for you too, depending a bit on your log output. If you're not sure, it's better not to mess with anything and just pastebin the output first.

Noerde's picture

Yep, after reboot the update continues as it should, thanks.

edit: after update it still shows the patch as installed, and it can't be removed. What has changed though is that it actually works. After.13 update it did not work, it could not be uninstalled. Now it just canät be uninstalled :)

saba's picture

I get "Failed to remove patch" when i try to unapply it. even uninstalling it stays in the patch manager and can't be removed

Ingvix's picture

When did this start happening? Did you update the system without unapplying the patch, which should not be done under any circumstances?

Noerde's picture

Hi, another update, another problem.

The problem remains the same, the patch can't be uninstalled, it remains in patchmanager list as enabled and when unapplying it I only get "failed to remove  patch"

if I try:

/usr/sbin/patchmanager -u sailfishos-patch-improved-notification-preview

from command line I get

/usr/sbin/patchmanager -u sailfishos-patch-improved-notification-preview
[D] unknown:0 - "sailfishos-patch-improved-notification-preview ausmt-sailfishos-1\n"

I've tried to rename /usr/share/jolla-settings/pages/sailfishos-patch-improved-notification-preview directory to "force" the removal but it seems to be still in some internal log in patchmanager or something. Is there a way to "nuke" patchmanager from the system and remove all the traces so I could try again?

I think it began when for some reason unapply all patches when upgrading did not work when I did an upgrade in january or thereabouts.

Ingvix's picture

Yes, you should always check that "unapply all patches" does its job properly. It has failed me a few times.

Does your notification preview show as it does normally without this patch? If so, I believe following steps should fix the problem

  • Remove files "/usr/share/jolla-settings/entries/sailfishos-patch-improved-notification-preview.json" and "/usr/share/jolla-settings/pages/sailfishos-patch-improved-notification-preview/main.qml" if they exist in the system.
  • In "/var/lib/patchmanager/ausmt/control/" open each file with a text editor and remove lines that mention the patch name, either of those files mentioned in previous section or "NotificationPreview.qml".
  • Remove sailfishos-patches-improved-notification-preview directory and its content from "/var/lib/patchmanager/ausmt/patches".

Now the patch should appear disabled. Do notice that the current version does not work with 2.2.x. Updated patch will be out soon.

Noerde's picture

Just to let you know the above worked and there's no trace of the patch anymore. I'll install the new version when it's available. Thanks!

alina's picture

Wow, great update!

feldbaum's picture

Hallo Ingvix, i can install the newest version but if i want to apply the patch in patchmanager it failed. I am on 2.1.0.11 lijoki. Any ideas.

Ingvix's picture

I'm not sure. Did a previous version work? Do you have developer mode enabled and are you familiar with terminal?

feldbaum's picture

Yes, 0.3-1 works for me. Developer mode is enabled,but i´m not very familiar with terminal. But we can try it.

Ingvix's picture

Well, there's maybe no need to use terminal if you have a file browser that can access the system folders. Try to enable the patch once more and then copy the last logging in the file "/var/lib/patchmanager/ausmt/ausmt.log" starting where it says

sailfishos-patch-improved-notification-preview
  contains text patch

and paste it to Pastebin.

Pages