From 7376504dd2d642ca83d89d413794bc94bdd5c7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 20 Jul 2018 09:16:06 +0200 Subject: [PATCH] Make frontend state recovery recover selected file in IDE --- lib/tfw/networking/server/tfw_server.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/tfw/networking/server/tfw_server.py b/lib/tfw/networking/server/tfw_server.py index 54edbf5..41bb7aa 100644 --- a/lib/tfw/networking/server/tfw_server.py +++ b/lib/tfw/networking/server/tfw_server.py @@ -73,7 +73,12 @@ class MessageStorage(ABC): class FrontendMessageStorage(MessageStorage): def filter_message(self, message): - return message['key'] in ('message', 'dashboard', 'queueMessages') + key = message['key'] + command = message.get('data', {}).get('command') + return ( + key in ('message', 'dashboard', 'queueMessages') + or key == 'ide' and command in ('select', 'read') + ) def transform_message(self, message): if message['key'] == 'queueMessages':