implement local-only posting

This commit is contained in:
sk
2023-01-24 16:04:17 +01:00
parent cf61626901
commit 2358d3c602
10 changed files with 136 additions and 38 deletions

View File

@@ -87,7 +87,7 @@
<TextView
android:id="@+id/self_name"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/self_avatar"
android:layout_marginTop="2sp"
@@ -97,6 +97,20 @@
android:textAppearance="@style/m3_title_medium"
tools:text="Eugen" />
<TextView
android:id="@+id/self_extra_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2sp"
android:layout_marginStart="8sp"
android:layout_toEndOf="@id/self_name"
android:ellipsize="end"
android:fontFamily="sans-serif"
android:singleLine="true"
android:textAlignment="viewStart"
android:textAppearance="@style/m3_title_medium"
tools:text="@string/sk_local_only" />
<TextView
android:id="@+id/self_username"
android:layout_width="match_parent"

View File

@@ -1,15 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/vis_public"
android:icon="@drawable/ic_fluent_earth_24_regular"
android:title="@string/visibility_public"/>
<item android:id="@+id/vis_unlisted"
android:icon="@drawable/ic_fluent_people_community_24_regular"
android:title="@string/sk_visibility_unlisted"/>
<item android:id="@+id/vis_followers"
android:icon="@drawable/ic_fluent_people_checkmark_24_regular"
android:title="@string/visibility_followers_only"/>
<item android:id="@+id/vis_private"
android:icon="@drawable/ic_fluent_mention_24_regular"
android:title="@string/visibility_private"/>
<group android:id="@+id/local_only_group" android:checkableBehavior="all">
<item
android:id="@+id/local_only"
android:icon="@drawable/ic_fluent_eye_24_regular"
android:title="@string/sk_local_only" />
</group>
<group android:id="@+id/visibility_group" android:checkableBehavior="single">
<item android:id="@+id/vis_public"
android:icon="@drawable/ic_fluent_earth_24_regular"
android:title="@string/visibility_public"/>
<item android:id="@+id/vis_unlisted"
android:icon="@drawable/ic_fluent_people_community_24_regular"
android:title="@string/sk_visibility_unlisted"/>
<item android:id="@+id/vis_followers"
android:icon="@drawable/ic_fluent_people_checkmark_24_regular"
android:title="@string/visibility_followers_only"/>
<item android:id="@+id/vis_private"
android:icon="@drawable/ic_fluent_mention_24_regular"
android:title="@string/visibility_private"/>
</group>
</menu>

View File

@@ -239,4 +239,7 @@
<string name="sk_inline_local_only">local-only</string>
<string name="sk_inline_direct">direct</string>
<string name="sk_separator">·</string>
<string name="sk_settings_support_local_only">Instance supports local-only posting</string>
<string name="sk_settings_glitch_instance">Use Glitch implementation</string>
<string name="sk_local_only">Local-only</string>
</resources>