diff --git a/mitterlib/ui/ui_zork.py b/mitterlib/ui/ui_zork.py index c789c4f..4e7be16 100644 --- a/mitterlib/ui/ui_zork.py +++ b/mitterlib/ui/ui_zork.py @@ -64,6 +64,7 @@ class Interface(cmd.Cmd): self._messages.extend(data) print '%d new messages, %d total messages now' % (len(data), len(self._messages)) + self._show_requests() def do_display(self, line=None): """Display the current message or move the cursor to the @@ -140,6 +141,7 @@ class Interface(cmd.Cmd): message = self._messages[self._cursor] thread = console_utils.fetch_thread(message, self._connection) console_utils.print_thread(thread, self._connection) + self._print_requests() def do_retweet(self, line): """Resends the original message to your followers.""" @@ -171,6 +173,19 @@ class Interface(cmd.Cmd): return False return True + def _show_requests(self): + requests = self._connection.available_requests() + available = [] + for network in requests: + if requests[network] >= 0: + # just show information for networks that count that + available.append('%d requests in %s' % ( + requests[network], + self._connection.name(network))) + + print 'You have %s' % (', '. join(available)) + print + # ----------------------------------------------------------------------- # Methods required by the main Mitter code # -----------------------------------------------------------------------