Skip to content
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

(minor tweak) Close open bag window on #disco #165

Closed
feeltheburn opened this issue Jan 1, 2022 · 6 comments
Closed

(minor tweak) Close open bag window on #disco #165

feeltheburn opened this issue Jan 1, 2022 · 6 comments

Comments

@feeltheburn
Copy link
Contributor

On using #disco command, any open window of a bag on the ground should probably close.

The bag may not be there when logging back in (without closing the window).

@pjbroad
Copy link
Collaborator

pjbroad commented Jan 2, 2022

Looks like the bag is not accessible even if you reconnect so the has to be reopened anyway. The #disconnect command is no different to being disconnected for other reasons so perhaps it should be closed for all disconnects. However, leaving the bag open is a good reminder. I'm not sure....

@gvissers
Copy link
Collaborator

gvissers commented Jan 2, 2022

Haven't tested this, but if the effect is that we have an unresponsive open bag window, I'm in favour of closing on disconnect. If we don't do this, we should at least add some sort of visual clue that the bag is currently inaccesible.

@feeltheburn
Copy link
Contributor Author

It's an unresponsive bag if it's gone. I #disco'ed an alt, took the bag with my main, then space-barred the alt back online. Bag was still open and there, but there was no actual bag.

(Unless there's a way to confirm the bag is actually still there, I'd say just close it.)

@pjbroad
Copy link
Collaborator

pjbroad commented Jan 6, 2022

Hmm. I did agree but have changed my mind again. Currently, if you disconnect then reconnect with the bag window open and the contents are still valid, you can access the bag just as normal. If you have altered the bag then only the still valid items can be accessed the invalid ones are visible but in accessible.

How about we leave the window open on disconnect, but on reconnect: if the window is open we close it if there is no bag there. If there is a bag there, we re-open the window. This way only valid items from a valid bag will be shown.

I have a patch with this working.

pjbroad added a commit that referenced this issue Jan 8, 2022
If we disconnect with an open ground bag, on reconnect the
bag or its contents may no longer be valid.  If the bags was closed
the state many still have changed.  If the window is open and there
is still a bag then re-validate its contents.  Otherwise close any
invalid open bag and/or clear the state of a previously opened bag.
@pjbroad
Copy link
Collaborator

pjbroad commented Jan 8, 2022

I've committed my changes.

@feeltheburn
Copy link
Contributor Author

Yeah, that sounds like the best option. It closes invalid bags when it's actually needed so that works. :)

Haven't tested but will close, reopen if an issue is seen with it when I do update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants