Bubble [main]

Visiting Dashboard updates emailing timestamp

0dd1b970685ea9521480cf6a921453c7c2d123fb
diff --git a/model.py b/model.py
index 95e9b44..f475a14 100644
--- a/model.py
+++ b/model.py
@@ -965,6 +965,7 @@ class Database:
         cur.execute('DELETE FROM likes WHERE post=?', (post.id,))
         cur.execute('DELETE FROM votes WHERE post=?', (post.id,))
         cur.execute('DELETE FROM posts WHERE id=?', (post.id,))
+        # NOTE: Comments on the destroyed post are kept as orphans.
         if post.parent:
             cur.execute(Database.NUM_CMTS_QUERY, (post.parent, post.parent))
         self.commit()
@@ -1698,6 +1699,7 @@ class Database:
     def mark_notifications_sent(self, user):
         cur = self.conn.cursor()
         cur.execute("UPDATE notifs SET is_sent=TRUE WHERE dst=?", (user.id,))
+        cur.execute("UPDATE users SET ts_email=CURRENT_TIMESTAMP() WHERE id=?", (user.id,))
         self.commit()
 
     def get_notifications(self, user, id=None, post_id=None, include_hidden=False, clear=False,