Implement optional notifications muting for account muting (#1856)

This commit is contained in:
Mélanie Chauvel 2020-07-27 10:28:59 +02:00 committed by GitHub
commit b3b4794a2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 240 additions and 49 deletions

View file

@ -0,0 +1,25 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical"
android:paddingTop="20dp"
android:paddingLeft="20dp"
android:paddingRight="20dp">
<TextView android:id="@+id/warning"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingBottom="20dp"
tools:text="@string/dialog_mute_warning"/>
<CheckBox android:id="@+id/checkbox"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textColor="@color/textColorTertiary"
app:buttonTint="@color/compound_button_color"
android:text="@string/dialog_mute_hide_notifications"/>
</LinearLayout>

View file

@ -22,14 +22,26 @@
style="@style/TuskyImageButton"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_toStartOf="@id/muted_user_mute_notifications"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical"
android:layout_marginStart="12dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="4dp"
app:srcCompat="@drawable/ic_unmute_24dp" />
<ImageButton
android:id="@+id/muted_user_mute_notifications"
style="@style/TuskyImageButton"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical"
android:layout_marginStart="12dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/action_unmute"
android:padding="4dp"
app:srcCompat="@drawable/ic_unmute_24dp" />
app:srcCompat="@drawable/ic_notifications_24dp" />
<LinearLayout
android:layout_width="wrap_content"