Skip to content

Commit

Permalink
fix: Re-enable accessiblity actions in all timelines (#715)
Browse files Browse the repository at this point in the history
22729df broke accessiblity actions in non-notification timelines by
returning too early if the status was not a NotificationViewData.
  • Loading branch information
nikclayton authored May 29, 2024
1 parent 09b8dba commit de7e5a9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ class ListStatusAccessibilityDelegate<T : IStatusViewData>(
// 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)
Expand Down

0 comments on commit de7e5a9

Please sign in to comment.