Betterbird / thunderbird-patches

Betterbird is a fork of Mozilla Thunderbird. Here are the patches that provide all the goodness.
Other
455 stars 20 forks source link

Feature request: Set default columns for new folders (upstream bug 1627151) #255

Closed Bangaio65 closed 7 months ago

Bangaio65 commented 7 months ago

This worked until Thunderbird 60 by setting the preference mailnews.database.global.views.conversation.columns. It stopped working on TB68.

See: https://bugzilla.mozilla.org/show_bug.cgi?id=1627151

Betterbird commented 7 months ago

This is surprising since the same code is present in TB 60 and on current "trunk", currently at version 123, also in 115:

60: https://searchfox.org/comm-esr60/rev/cf085e7235d63e37c13cc9ab6a3ef6d0c7b55aee/mailnews/db/gloda/modules/dbview.js#135-144

Trunk: https://searchfox.org/comm-central/rev/9d8f784d2fda384f0b3ba87c89219bb754467a31/mailnews/db/gloda/modules/GlodaSyntheticView.jsm#134-144

115: https://searchfox.org/comm-esr115/rev/addc9faea929374dcf7b8f6332b340c797d85c1d/mailnews/db/gloda/modules/GlodaSyntheticView.jsm#134-144

We'd have to investigate why that doesn't work any more.

That said, we noticed that there are two prefs, mailnews.database.global.views.global.columns and mailnews.database.global.views.conversation.columns. Shouldn't the former be used? At a guess, the latter only applies to "conversation" type views, such as global search results.

Betterbird commented 7 months ago

Looking at this a bit more, those prefs only ever were for global search views, not for normal folders. The default column for regular folders were always hard-coded and never configurable:

Trunk: https://searchfox.org/comm-central/rev/9d8f784d2fda384f0b3ba87c89219bb754467a31/mail/base/content/modules/thread-pane-columns.mjs#27

60: https://searchfox.org/comm-esr60/rev/cf085e7235d63e37c13cc9ab6a3ef6d0c7b55aee/mail/base/content/folderDisplay.js#418

It would be a big job to introduce configurability here.

Bangaio65 commented 7 months ago

Then I may be remembering wrong, but I recall using autoconfig to set that value so I didn't have to do it manually each time I installed Thunderbird for an user.

Would it be possible to inherit the value from the Inbox folder instead? I see something about that in folderDisplay.js from 60.

Betterbird commented 7 months ago

I'm not an expert on autoconfig. From what I understand is that you can set prefs. Perhaps you're talking about the mail.threadpane.use_correspondents pref?

I've just tweaked the default column order in BB, it had to be done in code.