mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 22:47:05 +05:30
android: set web URI to null in saved posts screen
This commit is contained in:
parent
d15bf23eee
commit
834a59e46e
2 changed files with 9 additions and 2 deletions
|
@ -32,6 +32,12 @@ class MainActivity : ComponentActivity() {
|
||||||
|
|
||||||
override fun onProvideAssistContent(outContent: AssistContent?) {
|
override fun onProvideAssistContent(outContent: AssistContent?) {
|
||||||
super.onProvideAssistContent(outContent)
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ fun LobstersApp(
|
||||||
viewModel: ClawViewModel = viewModel(),
|
viewModel: ClawViewModel = viewModel(),
|
||||||
urlLauncher: UrlLauncher,
|
urlLauncher: UrlLauncher,
|
||||||
htmlConverter: HTMLConverter,
|
htmlConverter: HTMLConverter,
|
||||||
setWebUri: (String) -> Unit,
|
setWebUri: (String?) -> Unit,
|
||||||
) {
|
) {
|
||||||
var isFabVisible by remember { mutableStateOf(false) }
|
var isFabVisible by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
|
@ -140,6 +140,7 @@ fun LobstersApp(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
composable(Destinations.Saved.getRoute()) {
|
composable(Destinations.Saved.getRoute()) {
|
||||||
|
setWebUri(null)
|
||||||
DatabasePosts(
|
DatabasePosts(
|
||||||
items = savedPosts,
|
items = savedPosts,
|
||||||
listState = savedListState,
|
listState = savedListState,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue