From 4f65321a9d1a7776fa7152335ff07d038ce5f368 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Sat, 9 Dec 2023 22:30:58 +0100 Subject: [PATCH] fix: Prevent crash if an error is shown in a timeline without a FAB --- .../java/app/pachli/components/timeline/TimelineFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/app/pachli/components/timeline/TimelineFragment.kt b/app/src/main/java/app/pachli/components/timeline/TimelineFragment.kt index cd2ceab92..f12e71686 100644 --- a/app/src/main/java/app/pachli/components/timeline/TimelineFragment.kt +++ b/app/src/main/java/app/pachli/components/timeline/TimelineFragment.kt @@ -240,7 +240,7 @@ class TimelineFragment : ) snackbar = Snackbar.make( // Without this the FAB will not move out of the way - (activity as ActionButtonActivity).actionButton ?: binding.root, + (activity as? ActionButtonActivity)?.actionButton ?: binding.root, message, Snackbar.LENGTH_INDEFINITE, ).setTextMaxLines(5)