[BUG] checking window from app does not update badge
Closed this issue · 9 comments
as title
I had the hardest time to reproduce this, since I focused on the "app" (i.e. containing app) rather than the popover. I now see it, and will check as to why that update doesn't happen.
OK, I found it, but i want to test it properly. Sadly I won't have much time today - so it'll have to wait until tomorrow
Apparently the shop my wife wanted me to go to doesn't open, so I had another 30 minutes to test and change some more code to make the logic easier to comprehend. I hope that this solves the issue you were seeing
Actually, I did mean the containing app.
Changing and pressing save does not update the badge on the Safari window.
Well the thing I fixed, makes the popover better, so it wasn't wasted time.
For the problem you report, I had a look at documentation in the past and it seems like it would be very hard to make it happen, as the containing app and the extension do not actually have a direct line of communication. Please see:
https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/ExtensionOverview.html#//apple_ref/doc/uid/TP40014214-CH2-SW2 (see specifically: How an App Extension Communicates)
What will happen is that Safari will re-evaluate the tabs as soon as it becomes active and the update happens.
If it is ok with you, I would want to drop this as a known issue. Once you click into Safari the update will happen. Sorry for trying to get out of this one...
Yeah, no worries.
Do you see real value in the minimal settings embedded in containing app?
The minimal settings the way I had it makes no sense, I was thinking about it yesterday and decided to change the containing app a bit to have two tabs - Welcome - Settings - this way it is available, yet not super in your face in a cluttered untidy way, as it was.I am not going to claim that it is much better, but I think it should remove the key concern of it being stuck in a corner with little visibility and explanation
Cool.
Do settings get saved OK even before extension is activated?
Do you think "Open Safari Extension Preferences" should be visible in both tabs?
Yes, the settings should be saved, as I am saving them to User Default with a shared group. So the setting is there waiting for the extension :)
Not sure about the "Open Safari Extension Preferences" - I think one place seems appropriate, but happy to put it in the second tab, if you feel it ought to be there.