Hide unsync icon for offline mode
This commit is contained in:
parent
a02cfef105
commit
535109d08f
1 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:clipboard/clipboard.dart';
|
import 'package:clipboard/clipboard.dart';
|
||||||
|
import 'package:ente_auth/core/configuration.dart';
|
||||||
import 'package:ente_auth/ente_theme_data.dart';
|
import 'package:ente_auth/ente_theme_data.dart';
|
||||||
import 'package:ente_auth/l10n/l10n.dart';
|
import 'package:ente_auth/l10n/l10n.dart';
|
||||||
import 'package:ente_auth/models/code.dart';
|
import 'package:ente_auth/models/code.dart';
|
||||||
|
@ -31,6 +32,7 @@ class _CodeWidgetState extends State<CodeWidget> {
|
||||||
final ValueNotifier<String> _nextCode = ValueNotifier<String>("");
|
final ValueNotifier<String> _nextCode = ValueNotifier<String>("");
|
||||||
final Logger logger = Logger("_CodeWidgetState");
|
final Logger logger = Logger("_CodeWidgetState");
|
||||||
bool _isInitialized = false;
|
bool _isInitialized = false;
|
||||||
|
late bool hasConfiguredAccount;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
@ -46,6 +48,7 @@ class _CodeWidgetState extends State<CodeWidget> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
hasConfiguredAccount = Configuration.instance.hasConfiguredAccount();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -174,8 +177,8 @@ class _CodeWidgetState extends State<CodeWidget> {
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
widget.code.hasSynced != null &&
|
(widget.code.hasSynced != null &&
|
||||||
widget.code.hasSynced!
|
widget.code.hasSynced!) || !hasConfiguredAccount
|
||||||
? Container()
|
? Container()
|
||||||
: const Icon(
|
: const Icon(
|
||||||
Icons.sync_disabled,
|
Icons.sync_disabled,
|
||||||
|
|
Loading…
Reference in a new issue