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

action sheet: add and implement delete topic option #3824

Merged
merged 6 commits into from
Feb 29, 2020

Commits on Feb 28, 2020

  1. messageActionSheet [nfc]: Refactor tests to make them type-checked.

    We are moving towards making all our tests type-checked. This
    commit is a move in that direction.
    agrawal-d committed Feb 28, 2020
    Configuration menu
    Copy the full SHA
    3c531ce View commit details
    Browse the repository at this point in the history
  2. api: Create API function for 'delete topic'.

    The 'delete topic' endpoint allows for the deletion of all messages
    in a stream for a given topic.
    agrawal-d committed Feb 28, 2020
    Configuration menu
    Copy the full SHA
    7b2353c View commit details
    Browse the repository at this point in the history
  3. topic actions: Create action 'deleteMessagesForTopic'.

    'deleteMessagesForTopic' deletes all messages (including those in
    outbox) for a given topic in a stream.
    agrawal-d committed Feb 28, 2020
    Configuration menu
    Copy the full SHA
    2bb9cec View commit details
    Browse the repository at this point in the history
  4. action sheet: Add delete topic feature.

    The webapp offers the feature to delete all messages within a
    topic for a stream. This feature is missing in the mobile app.
    
    Add 'Delete topic' button in message action sheet.
    
    Fixes zulip#3806.
    agrawal-d committed Feb 28, 2020
    Configuration menu
    Copy the full SHA
    b886b3d View commit details
    Browse the repository at this point in the history

Commits on Feb 29, 2020

  1. topic actions [nfc]: Simplify signature of deleteMessagesForTopic.

    `deleteMessagesForTopic` currently takes both a `Narrow` and a
    `Message | Outbox`. However, this is redundant; all the relevant
    information can be obtained from either one.
    
    Furthermore, neither is really necessary: we can just ask the caller
    to extract the data and hand it to us. Since the caller already knows
    that it's operating on a `stream` message, it's actually less trouble
    than constructing the `Narrow`.
    rk-for-zulip committed Feb 29, 2020
    Configuration menu
    Copy the full SHA
    5ae6afa View commit details
    Browse the repository at this point in the history
  2. topic actions [nfc]: Check outbox message type first.

    Outbox messages of type `private` will not have a comparable
    `.display_recipient`, and will have no `.subject` at all.
    
    While the comparisons currently performed are harmless and will, in
    this case, yield the right result, it's cleaner conceptually (and
    slightly safer when refactoring) to actually check the type first.
    rk-for-zulip committed Feb 29, 2020
    Configuration menu
    Copy the full SHA
    ad1556b View commit details
    Browse the repository at this point in the history