Use the atomic update decorator everywhere

This commit is contained in:
Kovid Goyal
2021-09-27 12:00:33 +05:30
parent b1f4b2d8ed
commit 7e17ed21ce
5 changed files with 26 additions and 22 deletions

View File

@@ -566,8 +566,9 @@ class Send(Handler):
self.failed_files.append(file)
self.asyncio_loop.call_soon(self.refresh_progress)
@Handler.atomic_update
def draw_progress(self) -> None:
with self.pending_update(), without_line_wrap(self.write):
with without_line_wrap(self.write):
for df in self.done_files:
sc = styled('', fg='green') if not df.err_msg else styled('', fg='red')
self.draw_progress_for_current_file(df, spinner_char=sc, is_complete=True)