add the ability to see who faved or boosted a toot (#962)
* move reblog/fav count up in detailed status view and make them clickable * use status object returned by api when reblogging/faving * Reblogs -> Boosts * add support for viewing who faved/reblogged a status * add onShowReblogs/onShowFavs to listener, fix display bug * remove unneeded icon from previous revision * small code improvements * fix liking/boosting toot with card
This commit is contained in:
parent
4864bb79d9
commit
c869886c19
13 changed files with 651 additions and 648 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/recycler_view"
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
android:id="@+id/status_avatar"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:contentDescription="@string/action_view_profile"
|
||||
android:scaleType="centerCrop"
|
||||
tools:src="@drawable/avatar_default" />
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
android:id="@+id/status_name_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_toEndOf="@+id/status_avatar"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="48dp"
|
||||
|
|
@ -71,15 +71,15 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/status_content_warning_description"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?attr/content_warning_button"
|
||||
android:minHeight="0dp"
|
||||
android:minWidth="160dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAllCaps="true"
|
||||
android:textOff="@string/status_content_warning_show_more"
|
||||
android:textOn="@string/status_content_warning_show_less"
|
||||
|
|
@ -118,10 +118,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="6dp"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingTop="6dp">
|
||||
android:paddingBottom="6dp">
|
||||
|
||||
<!--TODO: check if this needs emoji support-->
|
||||
<androidx.emoji.widget.EmojiTextView
|
||||
|
|
@ -164,8 +164,8 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/card_view"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginTop="@dimen/status_media_preview_margin_top">
|
||||
android:layout_marginTop="@dimen/status_media_preview_margin_top"
|
||||
android:layout_marginBottom="4dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/status_media_preview_0"
|
||||
|
|
@ -308,23 +308,66 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/status_media_preview_container"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:drawablePadding="4dp"
|
||||
android:textColor="?android:textColorTertiary"
|
||||
android:textSize="?attr/status_text_medium" />
|
||||
|
||||
<View
|
||||
android:id="@+id/status_info_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/status_timestamp_info"
|
||||
android:background="?attr/status_divider_drawable"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/status_reblog_fav_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/status_timestamp_info"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_reblogs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="4dp"
|
||||
android:textSize="?attr/status_text_medium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_favourites"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="4dp"
|
||||
android:textSize="?attr/status_text_medium" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/status_reblog_fav_info"
|
||||
android:background="?attr/status_divider_drawable"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/status_reblog_fav_info"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingTop="4dp">
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/status_reply"
|
||||
|
|
@ -353,12 +396,6 @@
|
|||
sparkbutton:primaryColor="@color/tusky_blue"
|
||||
sparkbutton:secondaryColor="@color/tusky_blue_light" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_reblogs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -377,12 +414,6 @@
|
|||
sparkbutton:primaryColor="@color/tusky_orange"
|
||||
sparkbutton:secondaryColor="@color/tusky_orange_light" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_favourites"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/status_text_medium" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue