mirror of
https://github.com/paul-nameless/tg
synced 2024-11-22 03:43:19 +00:00
GH-4: Use erase instead of clear to prevent screen flickering
If using clear the user sees the old screen, then a completely blank screen, then your new screen. If you use erase then it will instead modify the old screen to look like the new one.
This commit is contained in:
parent
dbd3b29b50
commit
db02c44596
1 changed files with 3 additions and 3 deletions
|
@ -94,7 +94,7 @@ class StatusView:
|
|||
|
||||
def get_input(self):
|
||||
curses.curs_set(1)
|
||||
self.win.clear()
|
||||
self.win.erase()
|
||||
|
||||
buff = ''
|
||||
while True:
|
||||
|
@ -144,7 +144,7 @@ class ChatView:
|
|||
self.win.resize(self.h, self.w)
|
||||
|
||||
def draw(self, current, chats):
|
||||
self.win.clear()
|
||||
self.win.erase()
|
||||
# self.win.vline(0, self.w-1, curses.ACS_VLINE, self.h)
|
||||
for i, chat in enumerate(chats):
|
||||
# msg = f' {get_date(chat)} {chat["title"]} [{chat["unread_count"]}]: {get_last_msg(chat)}'
|
||||
|
@ -231,7 +231,7 @@ class MsgView:
|
|||
|
||||
def draw(self, current, msgs):
|
||||
# log.info('Dwaring msgs')
|
||||
self.win.clear()
|
||||
self.win.erase()
|
||||
count = self.h
|
||||
|
||||
for i, msg in enumerate(msgs):
|
||||
|
|
Loading…
Reference in a new issue