From de7e5a9df9321d381995d4331f1aa367fd04ddf2 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Wed, 29 May 2024 22:07:08 +0200 Subject: [PATCH] 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. --- .../java/app/pachli/util/ListStatusAccessibilityDelegate.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/pachli/util/ListStatusAccessibilityDelegate.kt b/app/src/main/java/app/pachli/util/ListStatusAccessibilityDelegate.kt index 614094b1c..39277584c 100644 --- a/app/src/main/java/app/pachli/util/ListStatusAccessibilityDelegate.kt +++ b/app/src/main/java/app/pachli/util/ListStatusAccessibilityDelegate.kt @@ -54,7 +54,9 @@ class ListStatusAccessibilityDelegate( // Ignore notifications that don't have an associated statusViewData, // otherwise the accessors throw IllegalStateException. // 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()) { info.addAction(if (status.isExpanded) collapseCwAction else expandCwAction)