# HG changeset patch # User Goffi # Date 1523714574 -7200 # Node ID ae58f84fe4e6b412785d368da36848f8d1435bb9 # Parent 05d602be0120e099c302cc7f6b1e6535b5f46536 plugin chat: fixed dropdown: dropdown was calling "open" each time a key was pressed, abd open is calling dismiss if dropdown is already opened. But dismiss is calling _real_dissmiss with a schedule, resulting in incoherent state and the dropdown not closed when expected. A check is now done to call "open" only when there is not already a dropdown, and to call dismiss when the text input is empty. diff -r 05d602be0120 -r ae58f84fe4e6 cagou/plugins/plugin_wid_chat.py --- a/cagou/plugins/plugin_wid_chat.py Fri Apr 13 19:29:35 2018 +0200 +++ b/cagou/plugins/plugin_wid_chat.py Sat Apr 14 16:02:54 2018 +0200 @@ -282,6 +282,7 @@ if not text: self._hi_comp_data = None self._hi_comp_last = None + self._hi_comp_dropdown.dismiss() return profile = list(self.profiles)[0] @@ -323,8 +324,8 @@ to_remove.append(c) for c in to_remove: dropdown.remove_widget(c) - - dropdown.open(wid) + if dropdown.attach_to is None: + dropdown.open(wid) self._hi_comp_last = text def messageDataConverter(self, idx, mess_id):