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

Remove ReplacementSpan, display diffs using CharacterStyle #3431

Merged
merged 22 commits into from
Jun 11, 2023
Merged

Remove ReplacementSpan, display diffs using CharacterStyle #3431

merged 22 commits into from
Jun 11, 2023

Commits on Feb 12, 2023

  1. Show the difference between edited statuses

    Diff each status against the previous version, comparing the different
    HTML as XML to produce a structured diff.
    
    Mark new content with `<ins>`, deleted content with `<del>`.
    
    Convert these to styled spans in `ViewEditsAdapter`.
    Nik Clayton committed Feb 12, 2023
    Configuration menu
    Copy the full SHA
    fd93f11 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2023

  1. Merge branch 'develop' into 3306-diff-status-edits

    Nik Clayton committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    8327cc8 View commit details
    Browse the repository at this point in the history
  2. Update diffx to 1.1.1

    Fixes issue with diffs splitting on accented characters
    Nik Clayton committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    1f40e77 View commit details
    Browse the repository at this point in the history
  3. Style edited strings with Android spans

    Don't use HTML spans and try and format them, create real Android spans.
    
    Do this with a custom tag handler that can add custom spans that set the
    text paint appropriately.
    Nik Clayton committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    1a85ce5 View commit details
    Browse the repository at this point in the history
  4. Lint

    Nik Clayton committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    472e774 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2023

  1. Move colors in to theme_colors.xml

    Nik Clayton committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    97ae6c2 View commit details
    Browse the repository at this point in the history
  2. Draw a roundrect for the backoround, add start/end padding

    Make the background slightlysofter by drawing it as a roundrect.
    
    Make the spans easier to understand by padding the start/end of each one with
    the width of a " " character. This is visual only, the underlying text is not
    changed.
    Nik Clayton committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    eb42cbf View commit details
    Browse the repository at this point in the history
  3. Catch exceptions when parsing XML

    Nik Clayton committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    3a9c72d View commit details
    Browse the repository at this point in the history
  4. Move sorting in to Dispatchers.Default coroutine

    Nik Clayton committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    530ed78 View commit details
    Browse the repository at this point in the history
  5. Merge branch 'develop' into 3306-diff-status-edits

    # Conflicts:
    #	app/src/main/java/com/keylesspalace/tusky/components/viewthread/edits/ViewEditsViewModel.kt
    Nik Clayton committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    e9e182d View commit details
    Browse the repository at this point in the history
  6. Scope the loader type

    Nik Clayton committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    0477f0d View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2023

  1. Remove alpha

    Nik Clayton committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    b541e73 View commit details
    Browse the repository at this point in the history
  2. Re-order edits, newest status at the bottom

    Nik Clayton committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    fce4a01 View commit details
    Browse the repository at this point in the history
  3. Remove ReplacementSpan use

    A ReplacementSpan can't cover multiple lines, so if the modified text was
    more than a line it ran off the end of the screen.
    
    https://medium.com/androiddevelopers/drawing-a-rounded-corner-background-on-text-5a610a95af5
    suggests a fix which involves a custom textview.
    Nik Clayton committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    e73c5d3 View commit details
    Browse the repository at this point in the history
  4. Adjust display of edited statuses

    - Show the most recent version in larger text, both to make the most recent
      version clearer, and for consistency with the thread view (where the version
      the user clicked in will also have been shown in larger text)
    - Scroll the most recent version in to view
    - Show a pinned header with the author's avatar, display name, and username
      in one place, instead of duplicating this information in each version of
      the status.
    Nik Clayton committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    1c0a59d View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2023

  1. Merge branch 'develop' into 3306-diff-status-edits

    # Conflicts:
    #	app/src/main/java/com/keylesspalace/tusky/components/viewthread/edits/ViewEditsAdapter.kt
    #	app/src/main/java/com/keylesspalace/tusky/components/viewthread/edits/ViewEditsViewModel.kt
    Nik Clayton committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    f2acc9c View commit details
    Browse the repository at this point in the history
  2. Merge branch 'develop' into 3306-diff-status-edits

    Nik Clayton committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    34631e7 View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2023

  1. Update app/src/main/java/com/keylesspalace/tusky/components/viewthrea…

    …d/edits/ViewEditsViewModel.kt
    Nik Clayton committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    838966b View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2023

  1. Merge remote-tracking branch 'origin/develop' into 3306-diff-status-e…

    …dits
    
    # Conflicts:
    #	app/src/main/res/values/strings.xml
    Nik Clayton committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    a135786 View commit details
    Browse the repository at this point in the history
  2. Show newest first

    - Resolve lint errors
    Nik Clayton committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    2a2fd68 View commit details
    Browse the repository at this point in the history
  3. Merge branch '3306-diff-status-edits' of https://github.com/nikclayto…

    …n/Tusky into 3306-diff-status-edits
    
    # Conflicts:
    #	app/src/main/java/com/keylesspalace/tusky/components/viewthread/edits/ViewEditsViewModel.kt
    #	app/src/main/res/values/strings.xml
    Nik Clayton committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    1fdeef8 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2023

  1. Merge branch 'develop' into 3306-diff-status-edits

    Nik Clayton committed Jun 11, 2023
    Configuration menu
    Copy the full SHA
    90923dc View commit details
    Browse the repository at this point in the history