From 6ae44fbb699f3c3fb8f9fa7d03a9c9752343559c Mon Sep 17 00:00:00 2001 From: Aitorbp Date: Thu, 19 Sep 2024 10:44:24 +0200 Subject: [PATCH] fix: Activity reference changed by requireActivity() --- .../android/presentation/files/details/FileDetailsFragment.kt | 2 +- .../com/owncloud/android/ui/preview/PreviewAudioFragment.kt | 2 +- .../java/com/owncloud/android/ui/preview/PreviewTextFragment.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/owncloudApp/src/main/java/com/owncloud/android/presentation/files/details/FileDetailsFragment.kt b/owncloudApp/src/main/java/com/owncloud/android/presentation/files/details/FileDetailsFragment.kt index 1a142db6485..4b2bb157013 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/presentation/files/details/FileDetailsFragment.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/presentation/files/details/FileDetailsFragment.kt @@ -217,7 +217,7 @@ class FileDetailsFragment : FileFragment() { } startListeningToOngoingTransfers() fileDetailsViewModel.checkOnGoingTransfersWhenOpening() - activity?.title = getString(R.string.details_label) + requireActivity().title = getString(R.string.details_label) } diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewAudioFragment.kt b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewAudioFragment.kt index 99d30ad2429..f214d9bf79a 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewAudioFragment.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewAudioFragment.kt @@ -94,7 +94,7 @@ class PreviewAudioFragment : FileFragment() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setHasOptionsMenu(true) - activity?.title = getString(R.string.audio_preview_label) + requireActivity().title = getString(R.string.audio_preview_label) } /** diff --git a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.kt b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.kt index 8a0fa4b579f..db53c1eef90 100644 --- a/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.kt +++ b/owncloudApp/src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.kt @@ -103,7 +103,7 @@ class PreviewTextFragment : FileFragment() { file = savedInstanceState.getParcelable(EXTRA_FILE) account = savedInstanceState.getParcelable(EXTRA_ACCOUNT) } - activity?.title = getString(R.string.text_preview_label) + requireActivity().title = getString(R.string.text_preview_label) setFile(file) setHasOptionsMenu(true) isOpen = true