Archive command on Local Folders Topic is solved

Board for discussions around the Epyrus mail and news client.

Moderator: athenian200

User avatar
Navigator
Fanatic
Fanatic
Posts: 115
Joined: 2023-02-24, 17:53

Re: Archive command on Local Folders

Unread post by Navigator » 2023-12-01, 22:41

Thank you. I look forward to this patch appearing in a future version of Epyrus.

User avatar
Navigator
Fanatic
Fanatic
Posts: 115
Joined: 2023-02-24, 17:53

Re: Archive command on Local Folders

Unread post by Navigator » 2023-12-02, 04:07

My word that was fast. Thanks and Merry Christmas to you too!

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1537
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Archive command on Local Folders

Unread post by athenian200 » 2023-12-02, 04:27

Navigator wrote:
2023-12-02, 04:07
My word that was fast. Thanks and Merry Christmas to you too!
Yeah, honestly I was looking for an excuse to release a new version of Epyrus anyway, but I didn't want it to be just security updates and no functionality improvements... I'm so glad someone finally reported a bug I could actually fix. :)
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Navigator
Fanatic
Fanatic
Posts: 115
Joined: 2023-02-24, 17:53

Re: Archive command on Local Folders

Unread post by Navigator » 2023-12-02, 04:30

:lol: :thumbup:

User avatar
Navigator
Fanatic
Fanatic
Posts: 115
Joined: 2023-02-24, 17:53

Re: Archive command on Local Folders

Unread post by Navigator » 2023-12-02, 14:56

athenian200 wrote:
2023-12-01, 20:33
Correct, the same fix seems to have been used for the RSS Feed accounts which lack their own identity. It ties archiving on/off to the pref mail.identity.default.archive_enabled. Without the fix I highlighted, RSS feeds exhibit the same behavior, archiving to the first e-mail account's IMAP folder. If I just add one more field to this test, telling it to also check if server.type is "none" (which is only the case in Local Folders), then trying to Archive mail in Local Folders... just results in an Archive folder being created in Local Folders and the mail being moved there. And correctly does nothing if the mail is already in Archives in Local Folders.
I found a small bug with the implementation in 2.1.1. When mail.identity.default.archive_enabled is set to false the Archive button and menu command should disappear when looking at Local Folders, just as it does when on a profile one unchecks "Keep archive messages in:" under Copies & Folders and then looks at messages in that account. As it is now the button and menu item remain but do nothing.

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1537
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Archive command on Local Folders

Unread post by athenian200 » 2023-12-02, 18:14

Navigator wrote:
2023-12-02, 14:56
I found a small bug with the implementation in 2.1.1. When mail.identity.default.archive_enabled is set to false the Archive button and menu command should disappear when looking at Local Folders, just as it does when on a profile one unchecks "Keep archive messages in:" under Copies & Folders and then looks at messages in that account. As it is now the button and menu item remain but do nothing.
Right, this isn't a perfect fix, unfortunately. This is basically is a hack to work around the fact that there is no identity associated with Local Folders or RSS feeds, and most of the code to make these features work properly is hopelessly dependent on each place having its own identity. I will try to improve it in the future, but this was the only solution that didn't require a lot of work.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Bilbo47
Fanatic
Fanatic
Posts: 240
Joined: 2017-11-18, 04:24

Re: Archive command on Local Folders

Unread post by Bilbo47 » 2023-12-02, 22:13

athenian200 wrote:
2023-12-01, 11:00
I'm wonder how this is supposed to be easier than coding an interface in Win32 or GTK ... seems messier than writing a standard Windows application
Yes, this has been one of the stumbling blocks to my getting started with coding for UXP, or forking any Moz-ish app :(

User avatar
Bilbo47
Fanatic
Fanatic
Posts: 240
Joined: 2017-11-18, 04:24

Re: Archive command on Local Folders

Unread post by Bilbo47 » 2023-12-02, 22:31

athenian200 wrote:
2023-12-01, 20:33
the same fix seems to have been used for RSS Feed accounts which lack their own identity.

The problem ... is that the code makes assumptions about how archiving should work based on the current "identity," which ... defaults to [usually] the first e-mail account listed, whether [or not] that has any relationship to the folder you're working with.
I imagine this is the sort of subtle bug, or not-quite-right behavior, that would be left over from adding the capability to handle more than one email account on to code that had previously assumed only one. Betcha the idea of "default account" became necessary backwards-wise, and ended up unintentionally promoting the "first listed" account to a special status, just because of not carrying the architectural change to every possible corner of the app.