Skip to content

Commit 25f905b

Browse files
author
Erika Perugachi
authored
Merge pull request #1186 from Hirobreak/push-subject
Correctly localizing subject
2 parents 186cf52 + 8498167 commit 25f905b

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

electron_app/src/globalManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const disableWindowsEvents = () => {
9696
};
9797

9898
const enableWindowsEvents = () => {
99-
global.windowsEventsDisabled = true;
99+
global.windowsEventsDisabled = false;
100100
};
101101

102102
const checkWindowsEvents = () => {

email_mailbox/src/utils/StringUtils.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,3 @@ export const splitSignalIdentifier = identifier => {
8585
const recipientId = parts.join('.');
8686
return { recipientId, deviceId };
8787
};
88-
89-
export const getSubjectFromPushMessage = (message, emptySubject) => {
90-
const matched = message.match(/"(.*)"/);
91-
if (!matched) return null;
92-
const substr = matched[0];
93-
if (substr === `""`) return `(${emptySubject})`;
94-
return substr;
95-
};

email_mailbox/src/utils/electronEventInterface.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ import Messages from './../data/message';
7070
import { MessageType } from './../components/Message';
7171
import { AttachItemStatus } from '../components/AttachItem';
7272
import { getShowEmailPreviewStatus, getUserGuideStepStatus } from './storage';
73-
import { getSubjectFromPushMessage } from './StringUtils';
7473
import {
7574
fetchAcknowledgeEvents,
7675
fetchEvents,
@@ -1462,15 +1461,11 @@ ipcRenderer.on(NOTIFICATION_RECEIVED, async (_, { data }) => {
14621461
break;
14631462
}
14641463
case NOTIFICATION_ACTIONS.OPEN_EMAIL: {
1465-
const subject = getSubjectFromPushMessage(
1466-
data.body,
1467-
string.mailbox.empty_subject
1468-
);
1469-
if (subject) {
1464+
if (data.subject) {
14701465
const title = string.notification.openEmail.title;
14711466
const message = string.notification.openEmail.message.replace(
14721467
'<subject>',
1473-
subject
1468+
data.subject
14741469
);
14751470
showNotificationApp({ title, message });
14761471
}

0 commit comments

Comments
 (0)