Make frontend state recovery recover selected file in IDE

This commit is contained in:
Kristóf Tóth 2018-07-20 09:16:06 +02:00
parent a8fdd3b0d8
commit 7376504dd2

View File

@ -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':