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

Newly created sub-folder not available for moving into until after Thunderbird restart #484

Open
LinuxOnTheDesktop opened this issue Jul 31, 2024 · 7 comments
Assignees

Comments

@LinuxOnTheDesktop
Copy link

I had a local 'Products' folder. I added a new subfolder to it - let's call that subfolder 'new'. I went to move an item (in a sentmail folder) into 'new'. I tried to do that by way of a QuickFolder tab that I have called 'Products'. But 'new' did not show within the 'Products' drop-down. I tried the drag several times. I was able to complete the operation after I restarted Thunderbird.

QF 6.6.1
Thunderbird 115.13.0 x64
Windows 10

@RealRaven2000 RealRaven2000 self-assigned this Aug 1, 2024
@RealRaven2000
Copy link
Owner

thanks for reporting, is it a POP3 or IMAP account? I will see if I can reproduce it. I think there should be a folder listener for such things but I need to do some thorough testing.

@LinuxOnTheDesktop
Copy link
Author

Thanks. All my accounts are IMAP - but the folder is a local folder.

@RealRaven2000
Copy link
Owner

Just tried a quick test here but the child folder shows immediately here:

image

I can add some debug settings for you to test with...

@LinuxOnTheDesktop
Copy link
Author

Thanks. What exactly did your test do, though? Did you merely click 'parent'?

Here is what happens when I click 'Products' (with red background being redaction):

image

@RealRaven2000
Copy link
Owner

sorry I see the screenshot, it just shows an empty folder (no messages) and you have subfolders shown in the folder tree (on the left), what do you expect to be different?

@LinuxOnTheDesktop
Copy link
Author

Hi Axel

I have confused things. Here is how.

Initially, I expected . . what I described in my first post. To wit: I expect that dragging to a QF tab will reveal a list, near the tab, of subfolders. Subsequently and erroneously I came to expect that, when I click a QF tab, a list of the relevant folder's subfolders will appear. That latter expectation is erroneous is that I base it, I think, on something that I merely thought I remembered.

The problem that I reported initially still stands - though it seems you have not managed to reproduce it.

@RealRaven2000
Copy link
Owner

Hi Axel

I have confused things. Here is how.

Initially, I expected . . what I described in my first post. To wit: I expect that dragging to a QF tab will reveal a list, near the tab, of subfolders.

this is correct: dragging should popup the subfolders as drag targets:

image

To get a full recursive list of all subfolders make sure to enabled "Expand subfolders...." in the Behavior section of general settings.

image

Subsequently and erroneously I came to expect that, when I click a QF tab, a list of the relevant folder's subfolders will appear.

yes - but only if you right-click the tab. clicking just activates the folder. Ctrl+click opens it in a new Tab. Keeping it as simple as possible with a normal click is one of the premises that makes QuickFolders successful.

That latter expectation is erroneous is that I base it, I think, on something that I merely thought I remembered.

The problem that I reported initially still stands - though it seems you have not managed to reproduce it.

Yeah I need to do some additional testing and look at what the code does here and how it could fail. For performance reasons the subfolder popup are not necessarily generate on click but cached, however there must be conditions when they are re-generated.

I have a general FolderListener that handles added folders by force-adding them to MRU via a timestamp (util.touch(fld || f))

I could potentially search all parent folders of their path to check whether they are in a QF tab and force recreating the popup menu at this stage, as relatively speaking it won't take too much performance when creating new subfolders. If would be much worse to do while dragging mails over multiple tabs.

  onFolderAdded: function(parent, item) {
    try {
      if (!QuickFolders) return;
      const util = QuickFolders.Util,
            Ci = Components.interfaces;
      let f = item.QueryInterface(Ci.nsIMsgFolder);
      util.logDebugOptional("listeners.folder", "onFolderAdded\n" + f.prettyName + "\n"  + f.URI);
      let fld = QuickFolders.Model.getMsgFolderFromUri(f.URI, true);
      if (!parent.flags & util.FolderFlags.MSG_FOLDER_FLAG_TRASH) {
        util.touch(fld || f); // set MRUTime, unless folder was deleted.
      }
      QuickFolders.FolderListener.lastAdded = f;
    }
    catch(e) { };     
  },

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

2 participants