Loosing "already read" state of messages
The "already read" state (greeen icon) of messages of a location is lost when going back to main screen.
Let me explain that by example:
- Main screen shows the big red exclamation icon for my (single) location. Fine.
- Tipping on that location opens the list of warnings for that location. Fine.
- In my case there is one unread warning shown with the red alert icon. Fine.
- Tipping on the warning opens it's description. Fine.
- Tipping the upper left arrow button goes back to the messages list. Fine.
- The message is now shown as "already read" with the green icon. Fine.
- Tipping the upper left arrow button goes back to the main screen. Fine.
- Main screen shows still the big red exclamation icon for the location. WRONG!
- Tipping again on that location opens the list of warnings for that location. Fine.
- The warning message is now again shown with the red alert icon. WRONG!
The steps from 4. to 10. can be repeated several times. Always the same behaviour!
Only if the message is marked as "already read" by tipping on its small alert icon (changing it to green) then the state is correctly assigned:
- Tipping on the small alert icon of the message changes the icon to green (read). Fine.
- Tipping the upper left arrow button goes back to the main screen. Fine.
- Main screen shows now the big gray icon (no new warnings) for my (single) location. Fine.
- Tipping on that location opens the list of warnings for that location. Fine.
- The warning is now shown with the green icon. Fine.
From now on the messages keep the state "already read".
Device :
- Device: OnePlus Nord
- OS: e-foundation eOS 2.0 (Android 12)
- App-version 0.6.0
Same behaviour on a Samsung A5 2017 with eOS 1.x
Thanks for the issue. This bug has already been fixed with version 0.6.1 (https://github.com/nucleus-ffm/foss_warn/pull/101). Please update to the newest version either via F-Droid or Github. If the problem remains, feel free to reopen this issue.
I'm not sure whether the issue is really fixed in complete. In the meantime I'm using version 070 (beta). Yesterday I received a warning and if I remember correctly the state was not updated in the main screen when going back from the location's warning list screen. Maybe I was using the phone's back button instead of the app's upper left arrow button (can't remember). I will examine and test it more detailled when the next warning will arrive.
Sorry, I can't reopen that issue by myself. I think It would require the user role "colaborator".
As I already reported: The issue still exists in 0.7.0 (beta):
Yesterday I received a new warning message and I was able to reproduce the behaviour:
- In overview screen the big round red warning icon is visible for a location
- Open the location entry
- In the list of warnings the entry is marked correctly with the small red exclamation icon
- Open the warning
- Go back with top-left arrow
- In the list of warnings the entry is now marked correctly with the green 'already read' icon
- Go back with top-left arrow
- WRONG: In overview screen the big round red warning icon is still visible!
- Open it the loacation entry again.
- WRONG: In the list of warnings the entry is again marked with the small red exclamation icon
- Open the warning again
- Go again back with top-left arrow
- In the list of warnings the entry is now marked correctly with the green 'already read' icon
- Go back with top-left arrow
- WRONG: In overview screen the big round red warning icon is still visible!
While testing I encountered some situations where all icons were updated but I can't remember exactly when this happened (I think the overview icon is updated to the gray one when I marked the warning message as read manually in the list of warnings. Additionally: When I close the App and reopen it, the warning is again marked as unread and I am able to reproduce the behaviour.
Please note, that I always used the top-left arrow button for back navigation.
I'm using FOSS Warn on a OnePlus Nord (avicii) with custom ROM /e/OS 1.21-s (stable build). It's based on LineageOS 19 (Android 12).
We could reproduce the behavior when we launch the app with a notification. If we open the app normally, the warnings are correctly marked as read the first time. Can you confirm that the issue only happens when the app is launched via a notification?
To test the behavior, you can select any place with an ongoing alert, use the developer settings in the app, and use the "Delete list of read warnings [...]" and the "test notification" buttons.
Additionally: When I close the App and reopen it, the warning is again marked as unread and I am able to reproduce the behaviour.
Do you mean when the place overview shows a grey sign and the warnings are correctly marked as read, and you close the app and reopen it, the warnings are again marked as unread?
Can you confirm that the issue only happens when the app is launched via a notification?
I can't remember how I opened the App the first time the new warning was received. But I can confirm that it happened also, when I opened the App "normally" a second time to reproduce the behaviour.
Do you mean when the place overview shows a grey sign and the warnings are correctly marked as read, and you close the app and reopen it, the warnings are again marked as unread?
Yes, exactly!
I think there will be a new warning tonight (we will probably have a thunderstorm in our region). Then I will have another look on the issue. As suggested I deleted the list of warnings and additionally closed the App completely by OS Apps settings and restarted it then.
Update:
In the meantime I use version 0.7.1 (beta)
In the last few days I have received several warning messages and the app's behavior was always identical:
- In overview screen the big round red warning icon is visible for a location
- Open the location entry
- In the list of warnings the entry is marked correctly with the small red exclamation icon
- Open the warning
- Go back with top-left arrow
- In the list of warnings the entry is now marked correctly with the green 'already read' icon
- Go back with top-left arrow
- WRONG: In overview screen the big round red warning icon is still visible!
Now repeat the steps a second time:
- Open the location entry again
- WRONG: In the list of warnings the entry is again marked with the small red exclamation icon
- Open the warning again
- Go again back with top-left arrow
- In the list of warnings the entry is now marked correctly with the green 'already read' icon
- Go back with top-left arrow
- CORRECT: Main screen shows now the big gray icon (no new warnings) for the location
Please note: In my initial report (with version 0.6.0) the behaviour in step 15 was not correct! The steps 1 - 8 could be repeated several times always with the same wrong result. Maybe there is an undefined variable dangling or there are related code changes to version 0.7.1.
From now on all icons are correct:
- Open the location entry again
- In the list of warnings the entry is marked correctly with the green 'already read' icon
- Open the warning again
- Go again back with top-left arrow
- In the list of warnings the entry is still marked correctly with the green 'already read' icon
- Go back with top-left arrow
- Main screen shows still the correct big gray icon (no new warnings) for the location
Steps 16 - 22 can be repeated as often as you want. Even after restarting the App the icons are always correct (that differs from my original observation I mentioned on 9th of July).
I opened the App always by its App Icon (not via the notification).
[Edited just typos]
@mstammberger Can you test the 0.8.0 alpha 2 https://github.com/nucleus-ffm/foss_warn/releases/tag/pre-0.8.0-alpha_2 and check if the issue is fixed now?
I failed to install 0.8.0 alpha2 on my phone running /e/OS 2.24-s. The error message told me something about conflicts with already installed packages. Do I have first to uninstall the previous version of FossWarn by hand?
Now I installed 0.8.0 alpha2 on an ancient Samsung S4 with /e/OS/ 2.2-r (Andriod 11) I use just for test purposes. The installation succeeded. Then there were some network timeout messages which might be reasoned by the really slow phone, but now I think it's running correctly and I'm looking forward to get some warnings now. (I adjusted the warning levels accordingly to the lowest possible.)
I will give you feedback soon.
Today I finally received a warning with 0.8.0 alpha2. It seems the actual issue is now corrected: The "already read" state is kept.
But now there's a new issue:
This happens every time when going back from the warning details page over the location's warnings overview to the locations overview (as seen in the screenshot above).
It does NOT happen when only going into the location's warnings overview and then immediately back to the locations overview.
The relevant log entries:
2025-01-02 13:05:17.587348 | FileContext: MapWidget | ErrorContext: Error while parsing geoJson | ErrorMessage: type 'int' is not a subtype of type 'double' in type cast 2025-01-02 13:05:24.736464 | FileContext: MapWidget | ErrorContext: Error while parsing geoJson | ErrorMessage: type 'int' is not a subtype of type 'double' in type cast
2025-01-02 13:05:24.736464 | FileContext: MapWidget | ErrorContext: Error while parsing geoJson | ErrorMessage: type 'int' is not a subtype of type 'double' in type cast
There was a DWD alert, right? I noticed this error for some alerts from DWD as they sometimes use int for coordinates instead of doubles, which results in this casting error.
Yes, I think it was a DWD alert.
2025-01-02 13:05:24.736464 | FileContext: MapWidget | ErrorContext: Error while parsing geoJson | ErrorMessage: type 'int' is not a subtype of type 'double' in type cast
This error is now fixed with version 0.8.1.