mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-23 09:10:04 +02:00
Fix issue #340
This commit is contained in:
parent
68f779c943
commit
63a5423d7d
1 changed files with 4 additions and 4 deletions
|
@ -763,11 +763,9 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
public void run() {
|
||||
String fedilabHugsTrigger = ":fedilab_hugs:";
|
||||
String fedilabMorseTrigger = ":fedilab_morse:";
|
||||
|
||||
if (s.toString().contains(fedilabHugsTrigger)) {
|
||||
newContent[0] = s.toString().replaceAll(fedilabHugsTrigger, "");
|
||||
|
||||
int toFill = 500 - currentLength;
|
||||
newContent[0] = s.toString().replaceAll(Pattern.quote(fedilabHugsTrigger), "").trim();
|
||||
int toFill = 500 - newContent[0].length();
|
||||
if (toFill <= 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -782,6 +780,7 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
newContent[0] = newContent[0] + hugs;
|
||||
holder.binding.content.setText(newContent[0]);
|
||||
holder.binding.content.setSelection(holder.binding.content.getText().length());
|
||||
statusList.get(holder.getBindingAdapterPosition()).text = newContent[0];
|
||||
autocomplete = false;
|
||||
updateCharacterCount(holder);
|
||||
};
|
||||
|
@ -826,6 +825,7 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
|
||||
Runnable myRunnable = () -> {
|
||||
holder.binding.content.setText(newContent[0]);
|
||||
statusList.get(holder.getBindingAdapterPosition()).text = newContent[0];
|
||||
holder.binding.content.setSelection(holder.binding.content.getText().length());
|
||||
autocomplete = false;
|
||||
updateCharacterCount(holder);
|
||||
|
|
Loading…
Reference in a new issue