File tree Expand file tree Collapse file tree
manager/app/src/main/java/me/weishu/kernelsu/ui/screen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,28 +176,29 @@ private fun UpdateCard(
176176 val newVersion = state.latestVersionInfo
177177 val title = stringResource(id = R .string.module_changelog)
178178 val updateText = stringResource(id = R .string.module_update)
179+ val updateDialog = rememberConfirmDialog(onConfirm = { actions.onOpenUrl(newVersion.downloadUrl) })
179180
180181 AnimatedVisibility (
181182 visible = state.hasUpdate,
182183 enter = fadeIn() + expandVertically(),
183184 exit = shrinkVertically() + fadeOut()
184185 ) {
185- val updateDialog = rememberConfirmDialog(onConfirm = { actions.onOpenUrl(newVersion.downloadUrl) })
186186 WarningCard (
187187 message = stringResource(id = R .string.new_version_available, newVersion.versionCode),
188- colorScheme.outline
189- ) {
190- if (newVersion.changelog.isEmpty()) {
191- actions.onOpenUrl(newVersion.downloadUrl)
192- } else {
193- updateDialog.showConfirm(
194- title = title,
195- content = newVersion.changelog,
196- markdown = true ,
197- confirm = updateText
198- )
188+ color = colorScheme.outline,
189+ onClick = {
190+ if (newVersion.changelog.isEmpty()) {
191+ actions.onOpenUrl(newVersion.downloadUrl)
192+ } else {
193+ updateDialog.showConfirm(
194+ title = title,
195+ content = newVersion.changelog,
196+ markdown = true ,
197+ confirm = updateText
198+ )
199+ }
199200 }
200- }
201+ )
201202 }
202203}
203204
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ fun AppProfileTemplateScreenMaterial(
127127 modifier = Modifier .pullToRefresh(
128128 state = pullToRefreshState,
129129 isRefreshing = state.isRefreshing,
130- onRefresh = { actions.onRefresh(false ) },
130+ onRefresh = { actions.onRefresh(true ) },
131131 ),
132132 topBar = {
133133 TopBar (
You can’t perform that action at this time.
0 commit comments