Skip to content

[messagegui][messages] Repeated old artist/track when changing tracks #4077

@kidneyhex

Description

@kidneyhex

Affected hardware version

Bangle 2

Your firmware version

2v28.6

The bug

When closing Message UI the music message is saved to flash with other messages.
Then when messages does a "modify" on future musicstate messages from gadgetbridge, it keeps pulling that one music message and giving old artist/album/track info.

Sometimes if GadgetBridge takes a while to send a new musicinfo, you can end up seeing the old music for quite a while.

Note: Just documenting this so you know it's happening and why.

Environment

Android + GadgetBridge
Message UI 0.89
Messages 0.67

Steps to reproduce

  1. Start playing music on phone
  2. Open Message UI while music is playing; hit next to get some track info to show.
  3. Close Message UI while music is still playing
  4. Reopen Message UI
  5. Press next track a few times; track from step 3 will keep showing up

You can also install the Messages Debug and see it repeated there.

Potential fixes

A) in Message UI, filter out the music message during saveToFlash
B) in Messages, add if (event.id !== "music") { when doing a "modify" on messages

    } else if (event.t==="modify") {
      if (event.id !== "music") {
        const old = exports.getMessages().find(m => m.id===event.id);
        if (old) event = Object.assign(old, event);
      }
    }

Installed apps

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions