-
Notifications
You must be signed in to change notification settings - Fork 945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Widget fixes #1488
Widget fixes #1488
Conversation
I think I got a crash while creating a widget:
Not sure if it's just my emulator (which also crashed afterwards) or the app... After rebooting it, the simple widgets seem to work, but the stacked widget tends to disappear for some reason, see video simplescreenrecorder-2022-09-05_20.28.54.mp4Do you have the same issues in the emulator? |
@hiqua I couldn't reproduce the first exception, but it should be impossible after ae8cf18. Are the widgets slightly more reliable after ee39ff0 and 2154d8c, or about the same? Edit: I just tested, and the StackWidget is also unreliable on Loop 2.0.3 and API 31. If anyone has a fix for this, PRs would be appreciated. On the other hand, since it's already broken in the current version, I don't consider it a blocker for 2.1.0. |
054964a
to
fe05cdc
Compare
fe05cdc
to
4c5a722
Compare
This PR implements some last-minute fixes related to widgets:
As mentioned in Checkmark widget (update) does not work in Android 13 #1463, API 33 apparently requires us to use
setPendingIntentTemplate
andsetOnClickFillInIntent
instead ofsetOnClickPendingIntent
, otherwise the clicks have no effect. This PR implements those changes.@hiqua Could you try it out and confirm that it has fixed the issue?
Unfortunately this intent template system requires all widgets in the collection to have the same type of intent; so if one of the habits in the StackWidget is numerical (and therefore requires us to launch an activity with a number picker), then, from what I understand, all widgets in the stack must also launch an activity. One potential workaround would be to have all widgets launch a BroadcastReceiver, then the receiver could launch an activity conditionally, but unfortunately this behavior is now also forbidden since API 32.
This PR also fixes The measurable checkmark widget is not working as intended #1468