mirror of
https://github.com/oxen-io/session-android.git
synced 2023-12-14 02:53:01 +01:00
Fix blocked contacts button (#1264)
This commit is contained in:
parent
ba4143c298
commit
7da3e4f022
3 changed files with 13 additions and 27 deletions
|
@ -1,9 +0,0 @@
|
|||
package org.thoughtcrime.securesms.preferences
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.widget.FrameLayout
|
||||
|
||||
class BlockedContactsLayout @JvmOverloads constructor(
|
||||
context: Context, attrs: AttributeSet? = null
|
||||
) : FrameLayout(context, attrs)
|
|
@ -3,7 +3,6 @@ package org.thoughtcrime.securesms.preferences
|
|||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import androidx.preference.PreferenceCategory
|
||||
import androidx.preference.PreferenceViewHolder
|
||||
|
||||
|
@ -16,8 +15,7 @@ class BlockedContactsPreference @JvmOverloads constructor(
|
|||
super.onBindViewHolder(holder)
|
||||
|
||||
holder.itemView.setOnClickListener {
|
||||
val intent = Intent(context, BlockedContactsActivity::class.java)
|
||||
context.startActivity(intent)
|
||||
Intent(context, BlockedContactsActivity::class.java).let(context::startActivity)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.thoughtcrime.securesms.preferences.BlockedContactsLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginHorizontal="@dimen/large_spacing"
|
||||
android:layout_marginVertical="@dimen/medium_spacing"
|
||||
android:layout_height="wrap_content">
|
||||
<Button
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:contentDescription="@string/AccessibilityId_blocked_contacts"
|
||||
style="@style/Widget.Session.Button.Common.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/medium_spacing"
|
||||
android:layout_marginHorizontal="@dimen/large_spacing"
|
||||
android:layout_marginVertical="@dimen/medium_spacing"
|
||||
android:text="@string/blocked_contacts_title"
|
||||
android:textColor="@color/destructive"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
</org.thoughtcrime.securesms.preferences.BlockedContactsLayout>
|
||||
|
|
Loading…
Reference in a new issue