def draw_record(self, line, row): date = convert_date(row["date"], row["timezone"]) self._draw_record( line, row["gm_msgid"] == -self._indicator[1], date, convert_addrs(row["from"]), row["subject"], convert_flags(row["flags"]), )
def draw_key(self, line, key): gm_msgid = -key[1] row = self._cache.db.execute( """ SELECT date, timezone, "from", subject, flags FROM gmail_messages WHERE gm_msgid=? """, (gm_msgid,), ).fetchone() date = convert_date(row["date"], row["timezone"]) self._draw_record( line, gm_msgid == -self._indicator[1], date, convert_addrs(row["from"]), row["subject"], convert_flags(row["flags"]), )