Revert "feat(linkSpan/longClick): use share intent istead of copy text"

This reverts commit bcfb63b57c.
This revert is necessary for consistency, as the other links arent long pressable
This commit is contained in:
LucasGGamerM 2023-04-15 20:45:59 -03:00
parent c1252638c6
commit 8a4231686b
1 changed files with 1 additions and 10 deletions

View File

@ -1,10 +1,8 @@
package org.joinmastodon.android.ui.text; package org.joinmastodon.android.ui.text;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.text.TextPaint; import android.text.TextPaint;
import android.text.style.CharacterStyle; import android.text.style.CharacterStyle;
import android.util.Log;
import android.view.View; import android.view.View;
import org.joinmastodon.android.ui.utils.UiUtils; import org.joinmastodon.android.ui.utils.UiUtils;
@ -49,14 +47,7 @@ public class LinkSpan extends CharacterStyle {
} }
public void onLongClick(View view) { public void onLongClick(View view) {
if (getType() == Type.URL) { UiUtils.copyText(view, getType() == Type.URL ? link : text);
Intent shareIntent = new Intent(Intent.ACTION_SEND)
.setType("text/plain")
.putExtra(Intent.EXTRA_TEXT, link);
view.getContext().startActivity(Intent.createChooser(shareIntent, null));
} else {
UiUtils.copyText(view, text);
}
} }
public String getLink(){ public String getLink(){