android: set web URI to null in saved posts screen

This commit is contained in:
Harsh Shandilya 2022-02-08 02:07:18 +05:30
parent d15bf23eee
commit 834a59e46e
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
2 changed files with 9 additions and 2 deletions

View file

@ -32,6 +32,12 @@ class MainActivity : ComponentActivity() {
override fun onProvideAssistContent(outContent: AssistContent?) {
super.onProvideAssistContent(outContent)
webUri?.let { outContent?.webUri = Uri.parse(it) }
if (outContent != null) {
if (webUri != null) {
outContent.webUri = Uri.parse(webUri)
} else {
outContent.webUri = null
}
}
}
}

View file

@ -51,7 +51,7 @@ fun LobstersApp(
viewModel: ClawViewModel = viewModel(),
urlLauncher: UrlLauncher,
htmlConverter: HTMLConverter,
setWebUri: (String) -> Unit,
setWebUri: (String?) -> Unit,
) {
var isFabVisible by remember { mutableStateOf(false) }
@ -140,6 +140,7 @@ fun LobstersApp(
)
}
composable(Destinations.Saved.getRoute()) {
setWebUri(null)
DatabasePosts(
items = savedPosts,
listState = savedListState,