Skip to content

Commit

Permalink
fix: Activity reference changed by requireActivity()
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitorbp committed Sep 19, 2024
1 parent 56c009a commit 544419f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class FileDetailsFragment : FileFragment() {
}
startListeningToOngoingTransfers()
fileDetailsViewModel.checkOnGoingTransfersWhenOpening()
activity?.title = getString(R.string.details_label)
requireActivity().title = getString(R.string.details_label)
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 544419f

Please sign in to comment.