Add Repeaters and Rooms settings for login and clock sync

Move login attempts and auto-fetch into the new section, and let a global clock-sync default be overridden per repeater.

Co-authored-by: zjs81 <zjs81@users.noreply.github.com>
This commit is contained in:
Cursor Agentandzjs81 committed 2026-11-21 01:06:26 +00:00
1 parent 1b804bd1eb
commit dca270e5ad
53 files changed
+1533 -128

No files matched your search

+13 -5
View File
@@ -198,10 +198,13 @@ class _RepeaterLoginDialogState extends State<RepeaterLoginDialog> {
await _storage.removeRepeaterPassword(widget.repeater.publicKeyHex);
}
final autoClockSync = await _storage
.getRepeaterAutoClockSyncAfterLoginEnabled(
widget.repeater.publicKeyHex,
);
final globalClockSync = mounted
? context.read<AppSettingsService>().settings.clockSyncAfterLogin
: false;
final autoClockSync = await _storage.repeaterClockSyncAfterLogin(
widget.repeater.publicKeyHex,
globalDefault: globalClockSync,
);
if (autoClockSync) {
try {
final timestampSeconds =
@@ -393,7 +396,12 @@ class _RepeaterLoginDialogState extends State<RepeaterLoginDialog> {
}
},
onSubmitted: (_) => _handleLogin(),
autofocus: _passwordController.text.isEmpty,
autofocus:
context
.watch<AppSettingsService>()
.settings
.loginPasswordAutofocus &&
_passwordController.text.isEmpty,
),
const SizedBox(height: 12),
CheckboxListTile(
+4
View File
@@ -324,6 +324,10 @@ class _RoomLoginDialogState extends State<RoomLoginDialog> {
),
onSubmitted: (_) => _handleLogin(),
autofocus:
context
.watch<AppSettingsService>()
.settings
.loginPasswordAutofocus &&
!PlatformInfo.isMobile &&
_passwordController.text.isEmpty,
),