Fix missing downloaded only/incognito banners in Browse Source (#7936)

This commit is contained in:
Ivan Iskandar
2022-09-04 22:14:37 +07:00
committed by GitHub
parent c7d09d098a
commit 99270e370e
3 changed files with 29 additions and 11 deletions

View File

@@ -70,6 +70,8 @@ open class BrowseSourceController(bundle: Bundle) :
val intent = WebViewActivity.newIntent(context, source.baseUrl, source.id, source.name)
context.startActivity(intent)
},
incognitoMode = presenter.isIncognitoMode,
downloadedOnlyMode = presenter.isDownloadOnly,
)
val onDismissRequest = { presenter.dialog = null }

View File

@@ -103,6 +103,9 @@ open class BrowseSourcePresenter(
var displayMode by preferences.sourceDisplayMode().asState()
val isDownloadOnly: Boolean by preferences.downloadedOnly().asState()
val isIncognitoMode: Boolean by preferences.incognitoMode().asState()
@Composable
fun getColumnsPreferenceForCurrentOrientation(): State<GridCells> {
val isLandscape = LocalConfiguration.current.orientation == Configuration.ORIENTATION_LANDSCAPE