From 098f2a96665dfbcc0545b47307c298e27d644851 Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Thu, 31 Aug 2023 17:57:22 +0200 Subject: [PATCH] remove embarassing logging --- hn.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hn.py b/hn.py index fa19839..a2ab73f 100755 --- a/hn.py +++ b/hn.py @@ -117,25 +117,21 @@ class Client: else: webbrowser.open(story.link) story.read = True + elif c == ord('r'): await self.reload() + elif c == curses.KEY_RESIZE: curses.resize_term(*self.screen.getmaxyx()) self.lines, self.cols = self.screen.getmaxyx() self.stories_in_a_site = self.lines - 3 - with open('log', 'a') as f: - f.write(f'resizing!!!') await self.load_more_if_needed() async def load_more_if_needed(self): - with open('log', 'a') as f: - f.write(f'len: {len(self.loadedstories)} res: { self.story_pos + self.stories_in_a_site}\n') if len(self.loadedstories) < self.story_pos + self.stories_in_a_site: # load more - with open('log', 'a') as f: - f.write('loading more...\n') await self.load_stories(self.story_pos, self.story_pos + self.stories_in_a_site) async def load_stories(self, from_pos, to_pos):