From b86887b56473567c1e7ac3651d692f3e4820f065 Mon Sep 17 00:00:00 2001 From: flyingrub Date: Mon, 25 Sep 2017 20:15:04 +0200 Subject: [PATCH] Add a menu entry to copy the link of a toot fixes #390 --- .../com/keylesspalace/tusky/fragment/SFragment.java | 10 ++++++++++ app/src/main/res/menu/status_more.xml | 2 ++ app/src/main/res/values-fr/strings.xml | 2 ++ app/src/main/res/values/strings.xml | 1 + 4 files changed, 15 insertions(+) diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/SFragment.java b/app/src/main/java/com/keylesspalace/tusky/fragment/SFragment.java index 1a5a6612..30830195 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/SFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/SFragment.java @@ -15,6 +15,9 @@ package com.keylesspalace.tusky.fragment; +import android.content.ClipData; +import android.content.ClipboardManager; +import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; @@ -271,6 +274,13 @@ public abstract class SFragment extends BaseFragment implements AdapterItemRemov startActivity(Intent.createChooser(sendIntent, getResources().getText(R.string.send_status_link_to))); return true; } + case R.id.status_copy_link: { + ClipboardManager clipboard = (ClipboardManager) + getActivity().getSystemService(Context.CLIPBOARD_SERVICE); + ClipData clip = ClipData.newPlainText(null, statusUrl); + clipboard.setPrimaryClip(clip); + return true; + } case R.id.status_mute: { mute(accountId); return true; diff --git a/app/src/main/res/menu/status_more.xml b/app/src/main/res/menu/status_more.xml index 95581c8f..627b3cce 100644 --- a/app/src/main/res/menu/status_more.xml +++ b/app/src/main/res/menu/status_more.xml @@ -12,6 +12,8 @@ android:title="@string/status_share_content"/> + Annuler Demandes de follow Utilisateurs muets + Copier le lien + Partager l’URL de votre pouet avec… Partager le pouet avec… diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7a8251a6..4d7cb6e6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -100,6 +100,7 @@ Reject Search Drafts + Copy the link Share toot URL to… Share toot to…