Update messagelist also if search line cleared

This commit is contained in:
Dmitri Bogomolov 2019-05-17 12:36:35 +03:00
parent d09782e53d
commit 045a2ef443
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -3884,14 +3884,16 @@ class MyForm(settingsmixin.SMainWindow):
def inboxSearchLineEditUpdated(self, text): def inboxSearchLineEditUpdated(self, text):
# dynamic search for too short text is slow # dynamic search for too short text is slow
if len(str(text)) < 3: text = str(text)
if 0 < len(text) < 3:
return return
messagelist = self.getCurrentMessagelist() messagelist = self.getCurrentMessagelist()
searchOption = self.getCurrentSearchOption() searchOption = self.getCurrentSearchOption()
if messagelist: if messagelist:
account = self.getCurrentAccount() account = self.getCurrentAccount()
folder = self.getCurrentFolder() folder = self.getCurrentFolder()
self.loadMessagelist(messagelist, account, folder, searchOption, str(text)) self.loadMessagelist(
messagelist, account, folder, searchOption, text)
def inboxSearchLineEditReturnPressed(self): def inboxSearchLineEditReturnPressed(self):
logger.debug("Search return pressed") logger.debug("Search return pressed")