support exclusive lists

closes sk22#576
This commit is contained in:
sk
2023-06-15 19:21:26 +02:00
parent b463ef65ce
commit 6595a088fb
12 changed files with 112 additions and 24 deletions

View File

@@ -0,0 +1,5 @@
<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="M6.75 7.5C6.345 7.5 6 7.183 6 6.778V6.723C6 6.33 6.305 6.002 6.698 6H6.75C12.963 6 18 11.037 18 17.25v0.052C17.998 17.695 17.67 18 17.277 18h-0.055c-0.405 0-0.722-0.345-0.722-0.75 0-5.385-4.365-9.75-9.75-9.75z" android:fillColor="@color/fluent_default_icon_tint"/>
<path android:pathData="M13.294 18c0.38 0 0.701-0.287 0.705-0.666L14 17.25C14 13.246 10.754 10 6.75 10H6.666C6.287 10.006 6 10.328 6 10.707v0.09C6 11.195 6.351 11.5 6.75 11.5c3.176 0 5.75 2.574 5.75 5.75 0 0.399 0.305 0.75 0.704 0.75h0.09zM9 16.5C9 17.328 8.328 18 7.5 18S6 17.328 6 16.5 6.672 15 7.5 15 9 15.672 9 16.5z" android:fillColor="@color/fluent_default_icon_tint"/>
<path android:pathData="M6.25 3C4.455 3 3 4.455 3 6.25v11.5C3 19.545 4.455 21 6.25 21h11.5c1.795 0 3.25-1.455 3.25-3.25V6.25C21 4.455 19.545 3 17.75 3H6.25zM4.5 6.25c0-0.966 0.784-1.75 1.75-1.75h11.5c0.966 0 1.75 0.784 1.75 1.75v11.5c0 0.966-0.784 1.75-1.75 1.75H6.25c-0.966 0-1.75-0.784-1.75-1.75V6.25z" android:fillColor="@color/fluent_default_icon_tint"/>
</vector>

View File

@@ -39,4 +39,53 @@
android:id="@+id/input"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:id="@+id/exclusive"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
android:minHeight="48dp"
android:gravity="center_vertical"
android:layoutDirection="locale">
<ImageView
android:id="@+id/icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginHorizontal="16dp"
android:importantForAccessibility="no"
android:tint="?android:textColorPrimary"
android:src="@drawable/ic_fluent_rss_24_regular"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="16dp"
android:paddingVertical="8dp"
android:textSize="16sp"
android:textColor="?android:textColorPrimary"
android:text="@string/sk_list_exclusive_switch" />
<Switch
android:id="@+id/exclusive_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="12dp"
android:duplicateParentState="true"
android:focusable="false"
android:clickable="false"/>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="24dp"
android:layout_marginBottom="8dp"
android:textSize="14sp"
android:text="@string/sk_list_exclusive_switch_explanation" />
</LinearLayout>

View File

@@ -227,6 +227,7 @@
<string name="sk_icon_human">Human</string>
<string name="sk_icon_globe">Globe</string>
<string name="sk_icon_pin">Pin</string>
<string name="sk_icon_feed">Feed</string>
<string name="sk_edit_timeline">Edit timeline</string>
<string name="sk_edit_timelines">Edit timelines</string>
<string name="sk_alt_button">ALT</string>
@@ -305,4 +306,7 @@
<string name="sk_settings_prefix_replies_never">nobody</string>
<string name="sk_settings_prefix_replies_to_others">others</string>
<string name="sk_settings_forward_report_default">“Forward report” switch default</string>
<string name="sk_exclusive_list">Exclusive list</string>
<string name="sk_list_exclusive_switch">Make list exclusive</string>
<string name="sk_list_exclusive_switch_explanation">Members of an exclusive list will not show up on your home timeline if your instance supports it.</string>
</resources>