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:
53 files changed
+1533
-128
No files matched your search
@@ -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(
|
||||
|
||||
@@ -324,6 +324,10 @@ class _RoomLoginDialogState extends State<RoomLoginDialog> {
|
||||
),
|
||||
onSubmitted: (_) => _handleLogin(),
|
||||
autofocus:
|
||||
context
|
||||
.watch<AppSettingsService>()
|
||||
.settings
|
||||
.loginPasswordAutofocus &&
|
||||
!PlatformInfo.isMobile &&
|
||||
_passwordController.text.isEmpty,
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user