Compare commits

..

2 Commits

Author SHA1 Message Date
oSumAtrIX
e3558413b7 feat: Merge initial update choices to one 2026-03-12 23:13:41 +01:00
semantic-release-bot
5eea987b82 chore: Release v1.26.0-dev.35 [skip ci]
# app [1.26.0-dev.35](https://github.com/ReVanced/revanced-manager/compare/v1.26.0-dev.34...v1.26.0-dev.35) (2026-03-12)

### Features

* Add support for writing downloader UI with fragments ([#2998](https://github.com/ReVanced/revanced-manager/issues/2998)) ([7471710](7471710f28))
2026-03-12 20:49:42 +00:00
5 changed files with 25 additions and 53 deletions

View File

@@ -1,3 +1,10 @@
# app [1.26.0-dev.35](https://github.com/ReVanced/revanced-manager/compare/v1.26.0-dev.34...v1.26.0-dev.35) (2026-03-12)
### Features
* Add support for writing downloader UI with fragments ([#2998](https://github.com/ReVanced/revanced-manager/issues/2998)) ([7471710](https://github.com/ReVanced/revanced-manager/commit/7471710f287b4febb9546a7d7cd59d654b2754e9))
# app [1.26.0-dev.34](https://github.com/ReVanced/revanced-manager/compare/v1.26.0-dev.33...v1.26.0-dev.34) (2026-03-10)

View File

@@ -1 +1 @@
version = 1.26.0-dev.34
version = 1.26.0-dev.35

View File

@@ -27,57 +27,23 @@ import app.revanced.manager.ui.component.haptics.HapticCheckbox
import app.revanced.manager.util.transparentListItemColors
@Composable
fun AutoUpdatesDialog(onSubmit: (Boolean, Boolean) -> Unit) {
var patchesEnabled by rememberSaveable { mutableStateOf(true) }
var managerEnabled by rememberSaveable { mutableStateOf(true) }
fun AutoUpdatesDialog(onSubmit: (Boolean) -> Unit) {
var enabled by rememberSaveable { mutableStateOf(true) }
AlertDialog(
onDismissRequest = {},
confirmButton = {
TextButton(onClick = { onSubmit(managerEnabled, patchesEnabled) }) {
Text(stringResource(R.string.save))
TextButton(onClick = { onSubmit(enabled) }) {
Text(stringResource(R.string.confirm))
}
},
dismissButton = {
TextButton(onClick = { onSubmit(false) }) {
Text(stringResource(R.string.no))
}
},
icon = { Icon(Icons.Outlined.Update, null) },
title = { Text(text = stringResource(R.string.auto_updates_dialog_title)) },
text = {
Column(
verticalArrangement = Arrangement.spacedBy(8.dp),
) {
Text(text = stringResource(R.string.auto_updates_dialog_description))
Column {
AutoUpdatesItem(
headline = R.string.auto_updates_dialog_manager,
icon = Icons.Outlined.Update,
checked = managerEnabled,
onCheckedChange = { managerEnabled = it }
)
HorizontalDivider()
AutoUpdatesItem(
headline = R.string.auto_updates_dialog_patches,
icon = Icons.Outlined.Source,
checked = patchesEnabled,
onCheckedChange = { patchesEnabled = it }
)
}
Text(text = stringResource(R.string.auto_updates_dialog_note))
}
}
text = { Text(text = stringResource(R.string.auto_updates_dialog_description)) }
)
}
@Composable
private fun AutoUpdatesItem(
@StringRes headline: Int,
icon: ImageVector,
checked: Boolean,
onCheckedChange: (Boolean) -> Unit
) = ListItem(
leadingContent = { Icon(icon, null) },
headlineContent = { Text(stringResource(headline)) },
trailingContent = { HapticCheckbox(checked = checked, onCheckedChange = null) },
modifier = Modifier.clickable { onCheckedChange(!checked) },
colors = transparentListItemColors
)

View File

@@ -132,14 +132,14 @@ class DashboardViewModel(
}
}
fun applyAutoUpdatePrefs(manager: Boolean, patches: Boolean) = viewModelScope.launch {
fun applyAutoUpdatePrefs(enabled: Boolean) = viewModelScope.launch {
prefs.firstLaunch.update(false)
prefs.managerAutoUpdates.update(manager)
prefs.managerAutoUpdates.update(enabled)
if (manager) checkForManagerUpdates()
if (enabled) {
checkForManagerUpdates()
if (patches) {
with(patchBundleRepository) {
sources
.first()

View File

@@ -77,10 +77,9 @@ Second \"item\" text"</string>
<string name="legacy_import_failed">Could not import legacy settings</string>
<string name="auto_updates_dialog_title">Configure updates</string>
<string name="auto_updates_dialog_description">Do you want ReVanced Manager to periodically check for updates for the following components?</string>
<string name="auto_updates_dialog_manager">ReVanced Manager</string>
<string name="auto_updates_dialog_patches">ReVanced Patches</string>
<string name="auto_updates_dialog_note">These settings can be changed later.</string>
<string name="auto_updates_dialog_description">Do you want ReVanced Manager to periodically check for updates?
This can be changed later in the settings.</string>
<string name="announcements_filter_tag">Filter by tag</string>
<string name="announcements_show_archived">Show archived</string>