Skip to content

Commit

Permalink
rename listener
Browse files Browse the repository at this point in the history
  • Loading branch information
mebarbosa committed Nov 1, 2024
1 parent f1ca49c commit 5baa18b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ class StorageSettingsFragment : BaseFragment() {
@Inject
lateinit var settings: Settings

private var listener: LowStorageBottomSheetListener? = null
private var lowStorageListener: LowStorageBottomSheetListener? = null

override fun onAttach(context: Context) {
super.onAttach(context)
listener = context as? LowStorageBottomSheetListener
lowStorageListener = context as? LowStorageBottomSheetListener
}

override fun onDetach() {
super.onDetach()
listener = null
lowStorageListener = null
}

override fun onCreateView(
Expand All @@ -77,7 +77,7 @@ class StorageSettingsFragment : BaseFragment() {
super.onViewCreated(view, savedInstanceState)
viewLifecycleOwner.lifecycleScope.launch {
viewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
listener?.showModal()
lowStorageListener?.showModal()
viewModel.permissionRequest.collect { permissionRequest ->
if (permissionRequest == Manifest.permission.WRITE_EXTERNAL_STORAGE) {
requestPermissionLauncher.launch(permissionRequest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ internal fun LowStorageDialog(

RowButton(
text = stringResource(LR.string.manage_downloads),
contentDescription = stringResource(LR.string.manage_downloads),
onClick = { onManageDownloadsClick.invoke() },
includePadding = false,
textColor = MaterialTheme.theme.colors.primaryInteractive02,
Expand Down

0 comments on commit 5baa18b

Please sign in to comment.