mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 08:17:04 +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?) {
|
||||
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(),
|
||||
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue