diff --git a/git/release/output-metadata.json b/git/release/output-metadata.json index cd52caf16..e0be2e24d 100644 --- a/git/release/output-metadata.json +++ b/git/release/output-metadata.json @@ -28,19 +28,6 @@ "versionName": "1.7.9.4.1", "outputFile": "monocles chat-1.7.9.4.1-git-armeabi-v7a-release.apk" }, - { - "type": "ONE_OF_MANY", - "filters": [ - { - "filterType": "ABI", - "value": "x86_64" - } - ], - "attributes": [], - "versionCode": 16603, - "versionName": "1.7.9.4.1", - "outputFile": "monocles chat-1.7.9.4.1-git-x86_64-release.apk" - }, { "type": "ONE_OF_MANY", "filters": [ @@ -66,6 +53,19 @@ "versionCode": 16602, "versionName": "1.7.9.4.1", "outputFile": "monocles chat-1.7.9.4.1-git-x86-release.apk" + }, + { + "type": "ONE_OF_MANY", + "filters": [ + { + "filterType": "ABI", + "value": "x86_64" + } + ], + "attributes": [], + "versionCode": 16603, + "versionName": "1.7.9.4.1", + "outputFile": "monocles chat-1.7.9.4.1-git-x86_64-release.apk" } ], "elementType": "File" diff --git a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java index 519a2d43a..6729ffa1e 100644 --- a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java @@ -39,6 +39,7 @@ import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.EditText; import android.widget.ImageButton; import android.widget.ImageView; +import android.widget.LinearLayout; import android.widget.TextView; import android.widget.ArrayAdapter; import android.widget.Toast; @@ -742,16 +743,26 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp binding.statusImage.setVisibility(View.VISIBLE); final Spannable span = new SpannableString(message); if (Emoticons.isOnlyEmoji(message)) { - span.setSpan(new RelativeSizeSpan(2.0f), 0, message.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + span.setSpan(new RelativeSizeSpan(3.0f), 0, message.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); } binding.statusMessage.setText(span); //find and show images from links - for (String statusMessage : statusMessages) { - if (containsLink(statusMessage)) { - List url = extractUrls(statusMessage); - for (String imageurl : url) { - Picasso.get().load(imageurl).into(binding.statusImage); + int size = statusMessages.size(); + for (int i = 0; i < size; ++i) { + if (containsLink(statusMessages.get(i))) { + List url = extractUrls(statusMessages.get(i)); + for (int j = 0; j < url.size(); j++) { + Picasso.get().load(url.get(0)).into(binding.statusImage); + binding.statusImage.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + Intent intent = new Intent(); + intent.setAction(Intent.ACTION_VIEW); + intent.addCategory(Intent.CATEGORY_BROWSABLE); + intent.setData(Uri.parse(url.get(0))); + startActivity(intent); + } + }); } } } @@ -763,20 +774,27 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp for (int i = 0; i < s; ++i) { builder.append(statusMessages.get(i)); if (i < s - 1) { + if (containsLink(statusMessages.get(i))) { + List url = extractUrls(statusMessages.get(i)); + for (int j = 0; j < url.size(); j++) { + Picasso.get().load(url.get(0)).into(binding.statusImage); + binding.statusImage.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + Intent intent = new Intent(); + intent.setAction(Intent.ACTION_VIEW); + intent.addCategory(Intent.CATEGORY_BROWSABLE); + intent.setData(Uri.parse(url.get(0))); + startActivity(intent); + } + }); + } + } builder.append("\n"); } } binding.statusMessage.setText(builder); - //find and show images from links - for (String statusMessage : statusMessages) { - if (containsLink(statusMessage)) { - List url = extractUrls(statusMessage); - for (String imageurl : url) { - Picasso.get().load(imageurl).into(binding.statusImage); - } - } - } + } } else { if (statusMessages.size() == 0) { @@ -786,7 +804,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp binding.statusMessage.setVisibility(View.VISIBLE); final Spannable span = new SpannableString(message); if (Emoticons.isOnlyEmoji(message)) { - span.setSpan(new RelativeSizeSpan(2.0f), 0, message.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + span.setSpan(new RelativeSizeSpan(3.0f), 0, message.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); } binding.statusMessage.setText(span); } else { diff --git a/src/main/res/layout/activity_contact_details.xml b/src/main/res/layout/activity_contact_details.xml index 29c0e5b09..6975ca725 100644 --- a/src/main/res/layout/activity_contact_details.xml +++ b/src/main/res/layout/activity_contact_details.xml @@ -140,42 +140,6 @@ android:textAppearance="@style/TextAppearance.Conversations.Status" /> - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + +