Skip to content
Merged

Fixes #451

Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion electron_app/src/DBManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,6 @@ const baseThreadQuery = ({
),
db.raw(`GROUP_CONCAT(DISTINCT(${Table.FILE}.token)) as fileTokens`),
db.raw(`MAX(${Table.EMAIL}.unread) as unread`),
db.raw(`MIN(email.date) as minDate`),
db.raw(`MAX(email.date) as maxDate`)
)
.from(Table.EMAIL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Array [
"labels": "3",
"matchedContacts": "from",
"maxDate": "2018-06-15 08:23:19.120",
"minDate": "2018-06-14 08:23:19.120",
"preview": "RE: Hello there",
"recipientContactIds": "2,1",
"s3Key": "s3KeyD",
Expand Down Expand Up @@ -46,7 +45,6 @@ Array [
"labels": "1",
"matchedContacts": "from",
"maxDate": "2018-06-15 08:23:19.120",
"minDate": "2018-06-14 08:23:19.120",
"preview": "RE: Hello there",
"recipientContactIds": "2,1",
"s3Key": "s3KeyD",
Expand All @@ -72,7 +70,6 @@ Array [
"labels": null,
"matchedContacts": "from",
"maxDate": "2013-10-07 08:23:19.120",
"minDate": "2013-10-07 08:23:19.120",
"preview": "Hello there",
"recipientContactIds": "1",
"s3Key": "s3KeyB",
Expand Down
3 changes: 0 additions & 3 deletions email_mailbox/public/threads.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"preview":"v3m cNvAeKiY1EakWwnfTvLdO22YzkuS7bILjnWncQCwqHBHWfYNsQekd4A3",
"subject":"v3m cNvAeKiY1EakWwnfTvLdO22YzkuS7bILjnWncQCwqHBHWfYNsQekd4A3",
"date": "2018-09-10 16:13:30",
"minDate": "2018-09-10 16:13:30",
"status":0,
"unread":1,
"secure":1,
Expand All @@ -30,7 +29,6 @@
"preview":"Jq pUgbu1A0gywTYTeKuWfyfCNGgvWKnAK6SHx0ur 7qcMH3PU5S7ESoLTA3",
"subject":"Jq pUgbu1A0gywTYTeKuWfyfCNGgvWKnAK6SHx0ur 7qcMH3PU5S7ESoLTA3",
"date": "2018-09-10 16:23:30",
"minDate": "2018-09-10 16:23:30",
"status":0,
"unread":1,
"secure":1,
Expand All @@ -52,7 +50,6 @@
"preview":"Jqm pUgbu1A0gywTYTeKuWfyfCNGgvWKnAK6SHx0ur 7qcMH3PU5S7ESoLTA3",
"subject":"Jqm pUgbu1A0gywTYTeKuWfyfCNGgvWKnAK6SHx0ur 7qcMH3PU5S7ESoLTA3",
"date": "2018-10-10 16:13:30",
"minDate": "2018-10-10 16:13:30",
"status":0,
"unread":1,
"secure":1,
Expand Down
2 changes: 1 addition & 1 deletion email_mailbox/src/components/ThreadsWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class ThreadsWrapper extends Component {
const lastThread = this.props.threads.last();

if (scrollTop + height > scrollHeight - SCROLL_BOTTOM_LIMIT && lastThread) {
const date = lastThread.get('minDate');
const date = lastThread.get('maxDate');
if (this.state.lastMinDate !== date) {
this.setState({ lastMinDate: date }, () => {
this.props.onLoadThreads(
Expand Down
14 changes: 7 additions & 7 deletions email_mailbox/src/containers/ThreadItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,19 @@ const mapDispatchToProps = (dispatch, ownProps) => {
case LabelType.allmail.id: {
const { allLabels } = thread;
const draftLabelId = LabelType.draft.id;
const inboxLabelId = LabelType.inbox.id;
if (allLabels.includes(draftLabelId)) {
if (ownProps.mailbox === 'search') {
ownProps.onClickSelectedItem(type, {
...params,
searchParams: ownProps.searchParams
});
} else if (allLabels.includes(draftLabelId)) {
openEmailInComposer({
key: thread.key,
type: composerEvents.EDIT_DRAFT
});
break;
}
if (allLabels.includes(inboxLabelId)) {
} else {
ownProps.onClickSelectedItem(type, params);
break;
}
ownProps.onClickSelectedItem(type, params);
break;
}
default: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Immutable.List [
3,
4,
],
minDate: "2018-09-10 16:13:30",
fromContactName: Immutable.List [
"User a",
],
Expand Down Expand Up @@ -44,7 +43,6 @@ Immutable.List [
allLabels: Immutable.Set [
5,
],
minDate: "2018-09-10 16:23:30",
fromContactName: Immutable.List [
"User a",
],
Expand Down