remove embarassing logging
This commit is contained in:
parent
d8c2d6c8f7
commit
098f2a9666
8
hn.py
8
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):
|
||||
|
Loading…
Reference in New Issue
Block a user