Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message summary subjects #1589

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Dec 2, 2021

  1. db: message: Implement get_subject

    Provide a method to get the subject of a given message.
    
    The subject is cached by not-much in the database, and is efficient to
    access directly through the notmuch2.msg object.
    
    Store the subject in our Message representation so it can be used
    efficiently when parsing and displaying mail threads.
    
    Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
    
    ---
    Fix no subject mails
    kbingham committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    d95bbd9 View commit details
    Browse the repository at this point in the history
  2. db: message: allow initialisation with a parent reference

    Allow Message instances to be created with a reference to their parent
    Message object.
    
    Add a get_parent() helper to return the parent of a message, or None if
    it is a top level message.
    
    Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
    kbingham committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    512bfdc View commit details
    Browse the repository at this point in the history
  3. db: thread: Initialise Messages with their parent

    Provide a reference to the parent of any Message when it is initialised.
    
    Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
    kbingham committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    57b8c03 View commit details
    Browse the repository at this point in the history
  4. widgets: thread: Include Subject in MessageSummary

    Replies to a parent message are not shown to avoid filling the buffer
    with noisy repeating content.
    
    Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
    kbingham committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    46e7581 View commit details
    Browse the repository at this point in the history
  5. db: thread: Fix LookupError when no header(subject)

    Threads that do not have a subject will cause a LookupError() when
    retrieving the header.
    
    Catch this exception and set the subject to a null string.
    
    Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
    kbingham committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    f7bb7b6 View commit details
    Browse the repository at this point in the history