Fix issue with delete & re-draft
This commit is contained in:
parent
b79108f028
commit
88667d96d7
|
@ -47,7 +47,6 @@ import android.text.Html;
|
||||||
import android.text.InputFilter;
|
import android.text.InputFilter;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
@ -1855,20 +1854,19 @@ public class TootActivity extends BaseActivity implements OnRetrieveSearcAccount
|
||||||
}
|
}
|
||||||
toRemove.clear();
|
toRemove.clear();
|
||||||
}
|
}
|
||||||
String content;
|
String content = status.getContent();
|
||||||
if( !removed )
|
|
||||||
content = status.getContent();
|
|
||||||
else
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
|
||||||
content = Html.fromHtml(status.getContent(), Html.FROM_HTML_MODE_LEGACY).toString();
|
|
||||||
else
|
|
||||||
//noinspection deprecation
|
|
||||||
content = Html.fromHtml(status.getContent()).toString();
|
|
||||||
Pattern mentionLink = Pattern.compile("(<\\s?a\\s?href=\"https?:\\/\\/([\\da-z\\.-]+\\.[a-z\\.]{2,10})\\/(@[\\/\\w._-]*)\"\\s?[^.]*<\\s?\\/\\s?a\\s?>)");
|
Pattern mentionLink = Pattern.compile("(<\\s?a\\s?href=\"https?:\\/\\/([\\da-z\\.-]+\\.[a-z\\.]{2,10})\\/(@[\\/\\w._-]*)\"\\s?[^.]*<\\s?\\/\\s?a\\s?>)");
|
||||||
Matcher matcher = mentionLink.matcher(content);
|
Matcher matcher = mentionLink.matcher(content);
|
||||||
if (matcher.find()) {
|
if (matcher.find()) {
|
||||||
content = matcher.replaceAll("$3@$2");
|
content = matcher.replaceAll("$3@$2");
|
||||||
}
|
}
|
||||||
|
if( removed ) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||||
|
content = Html.fromHtml(content, Html.FROM_HTML_MODE_LEGACY).toString();
|
||||||
|
else
|
||||||
|
//noinspection deprecation
|
||||||
|
content = Html.fromHtml(content).toString();
|
||||||
|
}
|
||||||
if( attachments != null && attachments.size() > 0){
|
if( attachments != null && attachments.size() > 0){
|
||||||
toot_picture_container.setVisibility(View.VISIBLE);
|
toot_picture_container.setVisibility(View.VISIBLE);
|
||||||
picture_scrollview.setVisibility(View.VISIBLE);
|
picture_scrollview.setVisibility(View.VISIBLE);
|
||||||
|
|
Loading…
Reference in New Issue