Implement optional notifications muting for account muting (#1856)
This commit is contained in:
parent
5a4fc41f76
commit
b3b4794a2b
17 changed files with 240 additions and 49 deletions
12
app/src/main/res/drawable/ic_notifications_off_24dp.xml
Normal file
12
app/src/main/res/drawable/ic_notifications_off_24dp.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:pathData="M0 0h24v24H0z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M20 18.69L7.84 6.14 5.27 3.49 4 4.76l2.8 2.8v0.01c-0.52 0.99 -0.8 2.16-0.8 3.42v5l-2 2v1h13.73l2 2L21 19.72l-1-1.03zM12 22c1.11 0 2-0.89 2-2h-4c0 1.11 0.89 2 2 2zm6-7.32V11c0-3.08-1.64-5.64-4.5-6.32V4c0-0.83-0.67-1.5-1.5-1.5s-1.5 0.67 -1.5 1.5v0.68c-0.15 0.03 -0.29 0.08 -0.42 0.12 -0.1 0.03 -0.2 0.07 -0.3 0.11 h-0.01c-0.01 0-0.01 0-0.02 0.01 -0.23 0.09 -0.46 0.2 -0.68 0.31 0 0-0.01 0-0.01 0.01 L18 14.68z" />
|
||||
</vector>
|
||||
25
app/src/main/res/layout/dialog_mute_account.xml
Normal file
25
app/src/main/res/layout/dialog_mute_account.xml
Normal 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>
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -108,6 +108,9 @@
|
|||
<string name="action_share">Share</string>
|
||||
<string name="action_mute">Mute</string>
|
||||
<string name="action_unmute">Unmute</string>
|
||||
<string name="action_unmute_desc">Unmute %s</string>
|
||||
<string name="action_unmute_notifications_desc">Unmute notifications from %s</string>
|
||||
<string name="action_mute_notifications_desc">Mute notifications from %s</string>
|
||||
<string name="action_mute_domain">Mute %s</string>
|
||||
<string name="action_unmute_domain">Unmute %s</string>
|
||||
<string name="action_mute_conversation">Mute conversation</string>
|
||||
|
|
@ -199,6 +202,7 @@
|
|||
<string name="mute_domain_warning_dialog_ok">Hide entire domain</string>
|
||||
<string name="dialog_block_warning">Block @%s?</string>
|
||||
<string name="dialog_mute_warning">Mute @%s?</string>
|
||||
<string name="dialog_mute_hide_notifications">Hide notifications</string>
|
||||
|
||||
<string name="visibility_public">Public: Post to public timelines</string>
|
||||
<string name="visibility_unlisted">Unlisted: Do not show in public timelines</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue