rafatosta / zapzap

WhatsApp desktop application written in Pyqt6 + PyQt6-WebEngine.
https://rtosta.com/zapzap-web/
GNU General Public License v3.0
91 stars 3 forks source link

It closes suddenly after a while #12

Closed CleoMenezesJr closed 2 years ago

CleoMenezesJr commented 2 years ago
Traceback (most recent call last):
  File "/app/lib/python3.9/site-packages/zapzap/engine/browser.py", line 77, in show_notification
    zapzap.service.dbus_notify.show(notification)
AttributeError: module 'zapzap' has no attribute 'service'

Version: 2.0

zhrexl commented 2 years ago

As a solution to this issue I'd strongly recommend you to rename show(notification) to something like notification_show(notification) and then call it like that:

def show_notification(self, notification): 
    if get_setting('notify_desktop'): 
        notification_show(notification)

That way you avoid typing mistakes like that and improve the readability.

The actual fix is just writing services instead of service in the show() call.

rafatosta commented 2 years ago

really talking about the S of serviceS. I'll fix it today.