fix: 修复长按朗读按钮打开的界面不正确,改为打开朗读设置路由
This commit is contained in:
@@ -717,7 +717,9 @@ private fun ReadBookMenuSurface(
|
|||||||
onIntent(ReadBookIntent.HideMenu)
|
onIntent(ReadBookIntent.HideMenu)
|
||||||
onIntent(ReadBookIntent.OpenChapterList)
|
onIntent(ReadBookIntent.OpenChapterList)
|
||||||
},
|
},
|
||||||
onGoToBackground = { onIntent(ReadBookIntent.CloseReadBook) },
|
onGoToBackground = {
|
||||||
|
onIntent(ReadBookIntent.CloseReadBook(keepReadAloud = true))
|
||||||
|
},
|
||||||
onShowReadAloudConfig = {
|
onShowReadAloudConfig = {
|
||||||
onIntent(ReadBookIntent.ShowReadAloudConfig)
|
onIntent(ReadBookIntent.ShowReadAloudConfig)
|
||||||
},
|
},
|
||||||
@@ -931,7 +933,7 @@ private fun MenuTitleBar(
|
|||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
MenuTitleGlassButton(
|
MenuTitleGlassButton(
|
||||||
onClick = { onIntent(ReadBookIntent.CloseReadBook) },
|
onClick = { onIntent(ReadBookIntent.CloseReadBook()) },
|
||||||
icon = Icons.AutoMirrored.Filled.ArrowBack,
|
icon = Icons.AutoMirrored.Filled.ArrowBack,
|
||||||
contentDescription = "Back",
|
contentDescription = "Back",
|
||||||
state = state,
|
state = state,
|
||||||
@@ -2591,7 +2593,9 @@ private fun loadToolButtons(
|
|||||||
},
|
},
|
||||||
infoMap.getValue("read_aloud").toButton(
|
infoMap.getValue("read_aloud").toButton(
|
||||||
isActive = state.isReadAloudRunning,
|
isActive = state.isReadAloudRunning,
|
||||||
onLongClick = { onIntent(ReadBookIntent.ShowReadAloudConfig) },
|
onLongClick = {
|
||||||
|
onIntent(ReadBookIntent.OpenReadMenuRoute(ReadBookMenuRoute.ReadAloud))
|
||||||
|
},
|
||||||
) {
|
) {
|
||||||
if (state.isReadAloudRunning) {
|
if (state.isReadAloudRunning) {
|
||||||
onIntent(ReadBookIntent.OpenReadMenuRoute(ReadBookMenuRoute.ReadAloud))
|
onIntent(ReadBookIntent.OpenReadMenuRoute(ReadBookMenuRoute.ReadAloud))
|
||||||
@@ -2983,7 +2987,7 @@ private fun loadFloatingIcons(
|
|||||||
isActive = id in activeIds,
|
isActive = id in activeIds,
|
||||||
onClick = actionMap[id] ?: {},
|
onClick = actionMap[id] ?: {},
|
||||||
onLongClick = if (id == "read_aloud") {
|
onLongClick = if (id == "read_aloud") {
|
||||||
{ onIntent(ReadBookIntent.ShowReadAloudConfig) }
|
{ onIntent(ReadBookIntent.OpenReadMenuRoute(ReadBookMenuRoute.ReadAloud)) }
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user