fix: Re-enable accessiblity actions in all timelines (#715)

22729df1 broke accessiblity actions in non-notification timelines by
returning too early if the status was not a NotificationViewData.
This commit is contained in:
Nik Clayton 2024-05-29 22:07:08 +02:00 committed by GitHub
parent 09b8dba8fe
commit de7e5a9df9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ class ListStatusAccessibilityDelegate<T : IStatusViewData>(
// Ignore notifications that don't have an associated statusViewData, // Ignore notifications that don't have an associated statusViewData,
// otherwise the accessors throw IllegalStateException. // otherwise the accessors throw IllegalStateException.
// See https://github.com/pachli/pachli-android/issues/669 // See https://github.com/pachli/pachli-android/issues/669
if ((status as? NotificationViewData)?.statusViewData == null) return if (status as? NotificationViewData != null) {
if (status.statusViewData == null) return
}
if (status.spoilerText.isNotEmpty()) { if (status.spoilerText.isNotEmpty()) {
info.addAction(if (status.isExpanded) collapseCwAction else expandCwAction) info.addAction(if (status.isExpanded) collapseCwAction else expandCwAction)