From 89911d56e9ee672705319d1d3a18f909c4138678 Mon Sep 17 00:00:00 2001 From: Daniel Andrei Date: Wed, 30 Oct 2019 10:49:59 +0200 Subject: [PATCH] Display newest conversation at launch (#1135) --- source/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/index.ts b/source/index.ts index 81905afa3..73d6c03b7 100644 --- a/source/index.ts +++ b/source/index.ts @@ -362,6 +362,12 @@ function createMainWindow(): BrowserWindow { app.dock.show(); } + ipcMain.once('conversations', () => { + // Messenger sorts the conversations by unread state. + // We select the first conversation from the list. + sendAction('jump-to-conversation', 1); + }); + ipcMain.on('conversations', (_event: ElectronEvent, conversations: Conversation[]) => { if (conversations.length === 0) { return;