[PR #418] [MERGED] add default sort order for imap folders - arrival or sent date #810

Closed
opened 2026-02-25 21:36:18 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/cypht-org/cypht/pull/418
Author: @kroky
Created: 7/31/2020
Status: Merged
Merged: 9/16/2020
Merged by: @jasonmunro

Base: masterHead: feature/default-sort-date


📝 Commits (1)

  • ee98884 add default sort order for imap folders - arrival or sent date; show arrival date in extended headers; fix sorting by sent date

📊 Changes

10 files changed (+126 additions, -12 deletions)

View changed files

📝 modules/core/functions.php (+12 -0)
📝 modules/core/handler_modules.php (+19 -0)
📝 modules/core/output_modules.php (+33 -0)
📝 modules/core/setup.php (+4 -1)
📝 modules/imap/functions.php (+10 -4)
📝 modules/imap/handler_modules.php (+16 -1)
📝 modules/imap/hm-imap.php (+13 -3)
📝 modules/imap/output_modules.php (+8 -2)
📝 modules/imap/setup.php (+1 -0)
📝 modules/imap/site.js (+10 -1)

📄 Description

This PR actually tries to solve 3 issues coming from discussion: https://github.com/jasonmunro/cypht/issues/378

  1. Add a site setting for default date sort order - up to now it defaults to arrival date but in some cases, the actual sent date (date from msg header) is preferred. Now it can be configured.

  2. Show arrival date in extended headers. We were only showing date header which is a bit confusing when coming from message list where it lists the arrival date.

  3. Fix sorting by sent date. Server correctly sorted messages and returned them in a formatted message list. However, there was one more sorting on the client side which used the timestamp of each row which came from the arrival date. Thus, sorting by sent date did not actually produce any different results - it was still sorting by arrival date. I have fixed this by actually changing the date column in the message list to display sent date when sorting by sent date. This requires clearing the imap page cache before reloading the form as the returned formatted message list is going to be different.

Let me know if you see any issues.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cypht-org/cypht/pull/418 **Author:** [@kroky](https://github.com/kroky) **Created:** 7/31/2020 **Status:** ✅ Merged **Merged:** 9/16/2020 **Merged by:** [@jasonmunro](https://github.com/jasonmunro) **Base:** `master` ← **Head:** `feature/default-sort-date` --- ### 📝 Commits (1) - [`ee98884`](https://github.com/cypht-org/cypht/commit/ee98884b1af2e3ef2a42806619ee1f606ccf4558) add default sort order for imap folders - arrival or sent date; show arrival date in extended headers; fix sorting by sent date ### 📊 Changes **10 files changed** (+126 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `modules/core/functions.php` (+12 -0) 📝 `modules/core/handler_modules.php` (+19 -0) 📝 `modules/core/output_modules.php` (+33 -0) 📝 `modules/core/setup.php` (+4 -1) 📝 `modules/imap/functions.php` (+10 -4) 📝 `modules/imap/handler_modules.php` (+16 -1) 📝 `modules/imap/hm-imap.php` (+13 -3) 📝 `modules/imap/output_modules.php` (+8 -2) 📝 `modules/imap/setup.php` (+1 -0) 📝 `modules/imap/site.js` (+10 -1) </details> ### 📄 Description This PR actually tries to solve 3 issues coming from discussion: https://github.com/jasonmunro/cypht/issues/378 1. Add a site setting for default date sort order - up to now it defaults to arrival date but in some cases, the actual sent date (date from msg header) is preferred. Now it can be configured. 2. Show arrival date in extended headers. We were only showing date header which is a bit confusing when coming from message list where it lists the arrival date. 3. Fix sorting by sent date. Server correctly sorted messages and returned them in a formatted message list. However, there was one more sorting on the client side which used the timestamp of each row which came from the arrival date. Thus, sorting by sent date did not actually produce any different results - it was still sorting by arrival date. I have fixed this by actually changing the date column in the message list to display sent date when sorting by sent date. This requires clearing the imap page cache before reloading the form as the returned formatted message list is going to be different. Let me know if you see any issues. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 21:36:18 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#810
No description provided.