mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-03-13 08:41:57 +08:00
Compare commits
2 Commits
api@1.0.0-
...
feat/merge
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3558413b7 | ||
|
|
5eea987b82 |
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
version = 1.26.0-dev.34
|
||||
version = 1.26.0-dev.35
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user