Handle status edit histories with < 2 entries (#3747)

This can happen if the edit history has not been propogated to the user's server.

If the edit history is missing then show an error with a link to the specifc Mastodon issue.

Fixes #3743
This commit is contained in:
Nik Clayton 2023-06-15 19:59:30 +02:00 committed by GitHub
commit 100673aa9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 85 additions and 61 deletions

View file

@ -1,6 +1,7 @@
package com.keylesspalace.tusky.view
import android.content.Context
import android.text.method.LinkMovementMethod
import android.util.AttributeSet
import android.view.Gravity
import android.view.LayoutInflater
@ -44,6 +45,7 @@ class BackgroundMessageView @JvmOverloads constructor(
clickListener: ((v: View) -> Unit)? = null
) {
binding.messageTextView.setText(messageRes)
binding.messageTextView.movementMethod = LinkMovementMethod.getInstance()
binding.imageView.setImageResource(imageRes)
binding.button.setOnClickListener(clickListener)
binding.button.visible(clickListener != null)