diff --git a/app/src/main/java/org/thoughtcrime/securesms/SessionDialogBuilder.kt b/app/src/main/java/org/thoughtcrime/securesms/SessionDialogBuilder.kt index 8d40dd2785..f780c80870 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/SessionDialogBuilder.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/SessionDialogBuilder.kt @@ -46,27 +46,7 @@ class SessionDialogBuilder(val context: Context) { .apply { orientation = VERTICAL } .also(dialogBuilder::setCustomTitle) - // Maximum height of the dialog. This comes into play in the Open URL dialog where we - // might have a a very, very long URL (which we provide a ScrollView for) - but without - // limiting the height of the dialog, the WRAP_CONTENT part can allow the dialog to be - // super tall! - // Note: I eye-balled this DP value for the max dialog height to make it match the - // height of regular not-scrollable dialogs. - val maxHeightInDp = 137 - val scale = context.resources.displayMetrics.density - val maxHeightInPx = (maxHeightInDp * scale + 0.5f).toInt() - - val contentView = LinearLayout(context).apply { - orientation = VERTICAL - - // Limit the max height of the dialog to the above value - viewTreeObserver.addOnGlobalLayoutListener { - if (height > maxHeightInPx) { - layoutParams.height = maxHeightInPx - requestLayout() - } - } - } + private val contentView = LinearLayout(context).apply { orientation = VERTICAL } private val buttonLayout = LinearLayout(context) @@ -157,8 +137,6 @@ class SessionDialogBuilder(val context: Context) { fun cancelButton(listener: (() -> Unit) = {}) = button(android.R.string.cancel, R.string.AccessibilityId_cancel) { listener() } - fun copyUrlButton(listener: (() -> Unit) = {}) = button(android.R.string.copyUrl, R.string.AccessibilityId_copy) { listener() } - fun button( @StringRes text: Int, @StringRes contentDescriptionRes: Int = text, diff --git a/app/src/main/java/org/thoughtcrime/securesms/reactions/ReactionRecipientsAdapter.java b/app/src/main/java/org/thoughtcrime/securesms/reactions/ReactionRecipientsAdapter.java index 08a9077a86..37bd7e4695 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/reactions/ReactionRecipientsAdapter.java +++ b/app/src/main/java/org/thoughtcrime/securesms/reactions/ReactionRecipientsAdapter.java @@ -62,9 +62,6 @@ final class ReactionRecipientsAdapter extends RecyclerView.Adapter