espruino / espruino/BangleApps

[messagegui] Music info lost if Auto-open messages is false (the default)

Open
#2,814 0 comments 0 reactions 0 assignees View on GitHub
area-apps state-decision-needed type-bug
Dominant language
JavaScript
Stars
571
Forks
1.3k
Avg merge
17h 38m
Merged PRs (30d)
17

Description

### Affected hardware version

Bangle 2

### Your firmware version

2v18

### The bug

To reproduce:

* Be on clock
* Play music on the phone (with Gadgetbridge), or paste:

```
GB({t:"musicinfo",artist:"No Doubt",album:"Tragic Kingdom",track:"Don't Speak",dur:263,c:-1,n:-1})
GB({t:"musicstate",state:"play",position:171,shuffle:1,repeat:1})
```

* ... Nothing happens
* Look in `messages` app - **no messages shown**
* Stop/restart music - **still no messages shown**
* Exit messages, restart messages - **Music message shown in list**

Now I (now) know there's a menu item called `auto-open Music` and setting that effectively fixes this but without it, the current behaviour feels wrong.

I've just pushes a fix which allows the messages app to show a music message if it arrives while the message app is running, but I guess I'm wondering: If we receive music info when we're on clock, then we go to messages - we should probably end up showing music in the music list?

I wonder how we fix that without writing to storage for every music update message? We have `exports.music` so maybe we have to have a `E.on('kill` handler that writes the music into the messages list on exit?

### Installed apps

android,messages,messagegui,...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.