Skip to content

Duplicate widget + tray instances don’t share state: double update checks, unsynced UI, config divergence #126

@Txoka

Description

@Txoka

Issue:

  • If you add the panel widget to the desktop as well as the tray icon, each instance:
  • Starts its own update-checking loop (Timer searchTimer → JS.checkUpdates()), so checkupdates, etc. run twice.
  • Maintains a separate in-memory cache/news/config, so read/unread news items and pending-updates drift apart.
  • Shows duplicate notifications. (I didn't fully verify this, but I think I've seen it happen.)
  • They can interfere with each other if they check for updates at the same time and cause an error.

Reproduction:

  • Install Apdatifier (Plasma 6, Arch).
  • Leave the default tray icon alive.
  • Add the widget to the desktop.
  • Mark a news item as read in one instance => the other still shows it unread (until updated).
  • Change a setting in one plasmoid’s config screen => the other keeps the previous value (until updated).

Expected behaviour

  • Only one background job should perform update/news checks.
  • All visible instances (tray, panel, desktop) should reflect the same cache/news/config immediately.
  • Notifications should be emitted only once per event, not per instance.

Attempted fix:

  • A simple lock-file (apdatifier.lock) so only one instance keeps searchTimer running.
  • A FolderListModel directory watcher to reload config/cache/news on change.
    Unfortunately, I know nothing about plasma / plasmoids so I only managed to break it.

Also, I think the ideal solution would have a separate process (systemd?) run the updates and all the widgets listening and talking to that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions