Compare commits

..

No commits in common. "bf575bf881ad222bec2d5c7880c4a5b34b301672" and "bcb7cfc4f3d595fec60aa6a83aa7e4acff434e46" have entirely different histories.

8
hn.py
View File

@ -87,7 +87,7 @@ class Client:
page = int(self.story_pos / self.stories_in_a_site + 1)
total_pages = math.ceil(500/len(self.loadedstories))
total_pages = math.ceil(len(self.loadedstories)/500)
self.set_footer(f'Page {page}/{total_pages}, loaded {len(self.loadedstories)} stories.')
#self.set_footer(f'{self.loadedstories}')
@ -95,7 +95,7 @@ class Client:
c = self.screen.getch()
story = self.loadedstories[self.topstories[self.story_pos + self.cursor_pos]]
if c == ord('q'): # Quit
await self.exit()
self.exit()
elif c == curses.KEY_UP:
self.cursor_pos -= 1
if self.cursor_pos < 0:
@ -168,8 +168,8 @@ class Client:
self.draw()
await self.handle_input()
async def exit(self):
await self.session.close()
def exit(self):
self.session.close()
curses.endwin()
import sys
sys.exit(0)