Merge pull request #729 from hjubb/copy_url_link

Allow copying URL from conversation
This commit is contained in:
Harris
2021-09-21 00:13:59 +00:00
committed by GitHub
7 changed files with 147 additions and 52 deletions

View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:behavior_hideable="true"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
android:gravity="center_horizontal"
android:paddingTop="@dimen/large_spacing">
<TextView
android:id="@+id/openURLTitleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dialog_open_url_title"
android:textColor="@color/text"
android:textStyle="bold"
android:textSize="@dimen/large_font_size" />
<TextView
android:id="@+id/openURLExplanationTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dialog_open_url_explanation"
android:paddingHorizontal="@dimen/medium_spacing"
android:textColor="@color/text"
android:textSize="@dimen/small_font_size"
android:layout_margin="@dimen/large_spacing"
android:textAlignment="center" />
<TextView
android:id="@+id/openURLButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/BottomSheetActionItem"
android:text="@string/open"
/>
<TextView
android:id="@+id/copyButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/BottomSheetActionItem"
android:text="@string/copy_url"
/>
<TextView
android:textColor="@color/destructive"
android:id="@+id/cancelButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/BottomSheetActionItem"
android:text="@string/cancel"
/>
</LinearLayout>

View File

@@ -872,6 +872,7 @@
<string name="dialog_open_url_title">Open URL?</string>
<string name="dialog_open_url_explanation">Are you sure you want to open %s?</string>
<string name="open">Open</string>
<string name="copy_url">Copy URL</string>
<string name="dialog_link_preview_title">Enable Link Previews?</string>
<string name="dialog_link_preview_explanation">Enabling link previews will show previews for URLs you send and receive. This can be useful, but Session will need to contact linked websites to generate previews. You can always disable link previews in Session\'s settings.</string>