Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[auth] hide logout button from lockscreen when app in useWithoutBackup state

Aman Raj Singh Mourya94298cc1b5e9
diff --git a/auth/lib/ui/tools/lock_screen.dart b/auth/lib/ui/tools/lock_screen.dart
index 3793230798..4fb7759576 100644
--- a/auth/lib/ui/tools/lock_screen.dart
+++ b/auth/lib/ui/tools/lock_screen.dart
@@ -33,6 +33,9 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
int remainingTimeInSeconds = 0;
final _lockscreenSetting = LockScreenSettings.instance;
late Brightness _platformBrightness;
+ final bool hasOptedForOfflineMode =
+ Configuration.instance.hasOptedForOfflineMode();
+
@override
void initState() {
_logger.info("initiatingState");
@@ -53,13 +56,15 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
return Scaffold(
appBar: AppBar(
elevation: 0,
- leading: IconButton(
- icon: const Icon(Icons.logout_outlined),
- color: Theme.of(context).iconTheme.color,
- onPressed: () {
- _onLogoutTapped(context);
- },
- ),
+ leading: hasOptedForOfflineMode
+ ? const SizedBox.shrink()
+ : IconButton(
+ icon: const Icon(Icons.logout_outlined),
+ color: Theme.of(context).iconTheme.color,
+ onPressed: () {
+ _onLogoutTapped(context);
+ },
+ ),
),
body: GestureDetector(
onTap: () {