PushClient tries to register also if Network is offline (failing...)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Push QML |
Fix Committed
|
Undecided
|
Marco Trevisan (Treviño) |
Bug Description
If network is offline, PushClient fails to get the push token (while this could be cached after the first run, I guess it's something somewhat expected).
The problem with that is in order to be able to retry to register the app on failures, we need to set the PushClient.appId to a non-empty value different than the previous one (using something like a " " string and back to old appID, to workaround this is not nice)...
So, in my opinion the PushClient should try to register only when NetworkingStatu
And in any case, the user should be able to retry the registration on failures, without using appId workarounds.
I've workarounded this by using a loader bound to NetworkingStatu
Related branches
- Roberto Alsina (community): Approve
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 138 lines (+45/-6)5 files modifiedCMakeLists.txt (+3/-0)
debian/control (+2/-0)
src/Ubuntu/PushNotifications/CMakeLists.txt (+3/-0)
src/Ubuntu/PushNotifications/pushclient.cpp (+30/-4)
src/Ubuntu/PushNotifications/pushclient.h (+7/-2)
Changed in ubuntu-push-qml: | |
status: | New → In Progress |
assignee: | nobody → Marco Trevisan (Treviño) (3v1n0) |
Changed in ubuntu-push-qml: | |
status: | In Progress → Fix Committed |