Skip to content

Conversation

@shenlong-tanwen
Copy link
Member

Description

Reintroducing the previously available settings to perform backups only when charging, with a configurable initial delay on the new timeline for Android

Comment on lines +279 to +298
static int backupDelayToSliderValue(int ms) => switch (ms) {
5 => 0,
30 => 1,
120 => 2,
_ => 3,
};

static int backupDelayToSeconds(int v) => switch (v) {
0 => 5,
1 => 30,
2 => 120,
_ => 600,
};

static String formatBackupDelaySliderValue(int v) => switch (v) {
0 => 'setting_notifications_notify_seconds'.tr(namedArgs: {'count': '5'}),
1 => 'setting_notifications_notify_seconds'.tr(namedArgs: {'count': '30'}),
2 => 'setting_notifications_notify_minutes'.tr(namedArgs: {'count': '2'}),
_ => 'setting_notifications_notify_minutes'.tr(namedArgs: {'count': '10'}),
};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the widget code were yanked from the previously implementation. These will be refactored later when the entire UI widget layer is reworked into components

@alextran1502 alextran1502 enabled auto-merge (squash) September 17, 2025 14:11
@alextran1502 alextran1502 merged commit 61c3f27 into main Sep 17, 2025
55 checks passed
@alextran1502 alextran1502 deleted the feat/add-back-configurable-delay branch September 17, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants