mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-01-03 14:40:07 +02:00
Comment issue #414 - Display app when available
This commit is contained in:
parent
c640505fe6
commit
2625101883
2 changed files with 27 additions and 1 deletions
|
@ -1003,7 +1003,18 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
holder.binding.visibility.setImageResource(ressource);
|
holder.binding.visibility.setImageResource(ressource);
|
||||||
holder.binding.dateShort.setVisibility(View.GONE);
|
holder.binding.dateShort.setVisibility(View.GONE);
|
||||||
holder.binding.visibilitySmall.setVisibility(View.GONE);
|
holder.binding.visibilitySmall.setVisibility(View.GONE);
|
||||||
|
if (statusToDeal.application != null) {
|
||||||
|
holder.binding.app.setVisibility(View.VISIBLE);
|
||||||
|
holder.binding.app.setText(statusToDeal.application.name);
|
||||||
|
holder.binding.app.setOnClickListener(v -> {
|
||||||
|
Helper.openBrowser(context, statusToDeal.application.website);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
holder.binding.app.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
holder.binding.app.setVisibility(View.GONE);
|
||||||
holder.binding.editTime.setVisibility(View.GONE);
|
holder.binding.editTime.setVisibility(View.GONE);
|
||||||
holder.binding.visibilitySmall.setImageResource(ressource);
|
holder.binding.visibilitySmall.setImageResource(ressource);
|
||||||
if (displayCounters && canBeFederated) {
|
if (displayCounters && canBeFederated) {
|
||||||
|
|
|
@ -444,7 +444,7 @@
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/edit_time"
|
android:id="@+id/edit_time"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="48dp"
|
android:layout_marginStart="48dp"
|
||||||
android:layout_marginTop="6dp"
|
android:layout_marginTop="6dp"
|
||||||
android:alpha="0.8"
|
android:alpha="0.8"
|
||||||
|
@ -455,6 +455,21 @@
|
||||||
tools:text="1 January 2021, 12:00"
|
tools:text="1 January 2021, 12:00"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/app"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:alpha="0.8"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:padding="6dp"
|
||||||
|
android:textColor="@color/cyanea_accent_dark_reference"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:text="Fedilab"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:id="@+id/status_info"
|
android:id="@+id/status_info"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in a new issue