File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
app/src/main/java/com/duckduckgo/app/browser Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1579,9 +1579,11 @@ class BrowserTabFragment :
1579
1579
)
1580
1580
?.apply {
1581
1581
this .setAction(R .string.downloadsDownloadFinishedActionName) {
1582
- val result = downloadsFileActions.openFile(requireActivity(), File (command.filePath))
1583
- if (! result) {
1584
- view.makeSnackbarWithNoBottomInset(getString(R .string.downloadsCannotOpenFileErrorMessage), Snackbar .LENGTH_LONG ).show()
1582
+ activity?.let {
1583
+ val result = downloadsFileActions.openFile(it, File (command.filePath))
1584
+ if (! result) {
1585
+ view.makeSnackbarWithNoBottomInset(getString(R .string.downloadsCannotOpenFileErrorMessage), Snackbar .LENGTH_LONG ).show()
1586
+ }
1585
1587
}
1586
1588
}
1587
1589
}
You can’t perform that action at this time.
0 commit comments