Skip to content

Commit

Permalink
show the warning icon again when there is media without description (#…
Browse files Browse the repository at this point in the history
…4806)

Regression from the Material 3 redesign
  • Loading branch information
connyduck authored Dec 14, 2024
1 parent bf09433 commit ec3921d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -843,12 +843,8 @@ class ComposeActivity :
)
)

var oneMediaWithoutDescription = false
for (media in viewModel.media.value) {
if (media.description.isNullOrEmpty()) {
oneMediaWithoutDescription = true
break
}
val oneMediaWithoutDescription = viewModel.media.value.any { media ->
media.description.isNullOrEmpty()
}
binding.descriptionMissingWarningButton.visibility = if (oneMediaWithoutDescription) View.VISIBLE else View.GONE
}
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/layout/activity_compose.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
android:layout_width="52dp"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:padding="0dp"
android:contentDescription="@string/description_post_language"
android:padding="0dp"
android:textColor="?android:attr/textColorTertiary"
android:textSize="?attr/status_text_large"
android:textStyle="bold"
Expand Down Expand Up @@ -67,10 +67,10 @@
android:layout_gravity="end"
android:contentDescription="@string/hint_media_description_missing"
android:padding="8dp"
app:srcCompat="@drawable/ic_missing_description_24dp"
app:tint="@color/tusky_orange_light"
app:tooltipText="@string/hint_media_description_missing"
android:visibility="invisible" />
app:icon="@drawable/ic_missing_description_24dp"
app:iconTint="@color/tusky_orange_light"
app:tooltipText="@string/hint_media_description_missing" />

</com.google.android.material.appbar.MaterialToolbar>

<androidx.core.widget.NestedScrollView
Expand Down

0 comments on commit ec3921d

Please sign in to comment.