Dalamud
Dalamud copied to clipboard
Fix plugin entries staying open across tabs
Current behavior: Plugin listing at index i will be open on all tabs if opened on any tabs. Fix: Push ID of current tab before drawing.
Did you test this? Because the issue is actually caused by the openPluginCollapsibles
list being shared across tabs (I was lazy).
An easy way to fix this would be to call Clear() on the list whenever tabs are switched.
the quick fix is to probably change openPluginCollapsibles to be internalName + some other identifier
or internalName+version, and append to the dictionary on update so it stays open.
An easy way to fix this would be to call Clear() on the list whenever tabs are switched.
I think having persistence between tabs is a good idea.
or internalName+version, and append to the dictionary on update so it stays open.
Right now I'm doing internalName + version, though this introduces a minor edge case where an installed dev plugin can also exist in other tabs, causing it to mirror its state on both tabs. If that's acceptable then I'll push again.
I guess the general issue is "a plugin that can exist in multiple tabs at the same time will have its state mirrored", but I can't see a good way around that with the information available to the function.
In the pending pr I've got open, I'm passing the plugin in too, so we could conditionally add in the dll file path, and other stuff to differentiate between dev, normal, available and installed
On Tue, Sep 21, 2021, 4:01 PM attick @.***> wrote:
I guess the general issue is "a plugin that can exist in multiple tabs at the same time will have its state mirrored", but I can't see a good way around that with the information available to the function.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/goatcorp/Dalamud/pull/581#issuecomment-924339776, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFMTBFNFSJZIPIKOOWVTATUDDQARANCNFSM5EPM7VSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
That would work. I don't think it'd be particularly worth it to pass that data in just to fix the entries being open, but if you're using it for something else then I'll gladly make use of it. I suppose I'll wait until your PR is merged.
Given that this PR seems to have gone stale, I think it makes sense to close it for now. If this is still a problem and/or we still want this in the future, feel free to reopen it.