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

#5664 Pull email's received time directly on Gmail #5676

Merged
merged 32 commits into from
May 17, 2024
Merged
Changes from 12 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
847f30e
Pull email's received time directly on Gmail
martgil Apr 13, 2024
340840c
Merge branch 'master' into issue-5664-pull-recevied-email-time-from-g…
martgil Apr 17, 2024
a52e268
Merge remote-tracking branch 'origin' into issue-5664-pull-recevied-e…
martgil Apr 25, 2024
9b2bd08
update common.ts's fromDate function
martgil Apr 25, 2024
10d14b4
fix failing test
martgil Apr 25, 2024
5ed77ba
revert changes
martgil Apr 25, 2024
ea8d88f
revert changes on common.ts
martgil Apr 25, 2024
d4fb284
Use Gmail's received date cautiously, with the header date as a fallback
martgil Apr 25, 2024
90772d1
add proper date validity checking
martgil Apr 25, 2024
83dbb99
revert changes
martgil Apr 25, 2024
9c91b10
revert changes
martgil Apr 25, 2024
d53cbab
Ensure the retrieval of the received date on Gmail is fail-safe
martgil Apr 26, 2024
f351117
detect gmail timezone and use simple yyyy-dd-mm format used in toISOS…
martgil Apr 26, 2024
9ac9ecb
add comments
martgil Apr 26, 2024
f047a8e
code simplification
martgil Apr 27, 2024
5c03725
Unset user's date locale
martgil Apr 28, 2024
52e3dbc
use UTC Timezones
martgil Apr 28, 2024
a794cda
Fix correct time
martgil Apr 28, 2024
36b1a6d
Merge branch 'master' into issue-5664-pull-recevied-email-time-from-g…
martgil Apr 30, 2024
178e1c6
Merge remote-tracking branch 'origin/master' into issue-5664-pull-rec…
martgil May 7, 2024
ca2b9eb
revert changes
martgil May 8, 2024
c1d9d58
determine date/time based on Gmail settings
martgil May 8, 2024
8e2f79e
revert changes
martgil May 8, 2024
99c9f72
update tests
martgil May 8, 2024
c5977b5
apply simplification
martgil May 9, 2024
a139dfa
update test
martgil May 9, 2024
3c91125
Merge branch 'master' into issue-5664-pull-recevied-email-time-from-g…
martgil May 10, 2024
0fbec8d
fix test
martgil May 10, 2024
12914f4
update test
martgil May 13, 2024
d665af1
Merge remote-tracking branch 'origin/master' into issue-5664-pull-rec…
martgil May 13, 2024
1e9feeb
removed unnecessary tests
martgil May 14, 2024
5f0c984
Merge remote-tracking branch 'origin/master' into issue-5664-pull-rec…
martgil May 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion extension/js/common/message-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,13 @@ export class MessageRenderer {

private getMessageInfo = async (fullMsg: GmailRes.GmailMsg): Promise<MessageInfo> => {
const sentDate = GmailParser.findHeader(fullMsg, 'date');
const sentDateStr = sentDate ? Str.fromDate(new Date(sentDate)).replace(' ', ' at ') : '';
const gmailDateReceived = $('div.gK span[title]').attr('title');
let sentDateStr: string;
if (gmailDateReceived !== undefined && !isNaN(new Date(gmailDateReceived).getTime())) {
sentDateStr = gmailDateReceived.replace(', ', ' at ');
} else {
sentDateStr = sentDate ? Str.fromDate(new Date(sentDate)).replace(' ', ' at ') : '';
}
martgil marked this conversation as resolved.
Show resolved Hide resolved
const fromString = GmailParser.findHeader(fullMsg, 'from');
const from = fromString ? Str.parseEmail(fromString) : undefined;
const fromEmail = from?.email ?? '';
Expand Down
Loading