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

Allow drag n drop & fix a few issues with file sharing #572

Merged
merged 4 commits into from
Feb 2, 2024

Commits on Dec 25, 2023

  1. Allow dropping items onto buffer fragment

    Also “bump” language level to allow `..<`
    oakkitten committed Dec 25, 2023
    Configuration menu
    Copy the full SHA
    63da33b View commit details
    Browse the repository at this point in the history
  2. Prevent non-image shares from re-appearing in input on resuming activity

    We are using Glide to load thumbnails for all shares. If the request fails,
    Glide will re-attempt to fetch the image when the activity is resumed, e.g.
    when you switch to another app and back.
    
    This fixes the issue by cancelling the request on failure.
    oakkitten committed Dec 25, 2023
    Configuration menu
    Copy the full SHA
    0a5726e View commit details
    Browse the repository at this point in the history
  3. Insert spaces around share spans when textifying

    When inserting images & other media into the chat input, we add spaces
    around it to make sure the text doesn't touch the resulting URL. But if the
    user edits the text after, the text might touch the image again. This
    sometimes is hard to see, especially if the thumbnail and the text are on
    separate lines.
    
    To overcome this, also insert spaces around the URL when textifying.
    oakkitten committed Dec 25, 2023
    Configuration menu
    Copy the full SHA
    306496f View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2024

  1. Record input change after drag-n-drop

    In buffer fragments, we are saving input for parallel fragments
    (i.e. bubbles) on pause and restoring it on resume. On some systems,
    particularly on API 27, it's possible that, when dragging from another app,
    the target activity isn't actually resumed, hence this input change may fail
    to be recorded. To prevent this, explicitly record the change after loading
    the thumbnails.
    
    This includes a long-postponed conversion of thumbnail logic to coroutines.
    This facilitates waiting until the thumbnails are actually loaded and
    applied to the string.
    oakkitten committed Jan 28, 2024
    Configuration menu
    Copy the full SHA
    0ea489d View commit details
    Browse the repository at this point in the history