Skip to content

armgit / ente

Public Imported from GitHub
0

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

[auth] fix logout button not showing on lockscreen

Aman Raj Singh Mourya34b20573b5de
diff --git a/auth/lib/ui/tools/lock_screen.dart b/auth/lib/ui/tools/lock_screen.dart
index 625101db6b..71adcd3f28 100644
--- a/auth/lib/ui/tools/lock_screen.dart
+++ b/auth/lib/ui/tools/lock_screen.dart
@@ -33,8 +33,7 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
int remainingTimeInSeconds = 0;
final _lockscreenSetting = LockScreenSettings.instance;
late Brightness _platformBrightness;
- final bool hasOptedForOfflineMode =
- Configuration.instance.hasOptedForOfflineMode();
+ final bool isLoggedIn = Configuration.instance.isLoggedIn();
@override
void initState() {
@@ -56,15 +55,15 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
return Scaffold(
appBar: AppBar(
elevation: 0,
- leading: hasOptedForOfflineMode
- ? const SizedBox.shrink()
- : IconButton(
+ leading: isLoggedIn
+ ? IconButton(
icon: const Icon(Icons.logout_outlined),
color: Theme.of(context).iconTheme.color,
onPressed: () {
_onLogoutTapped(context);
},
- ),
+ )
+ : const SizedBox.shrink(),
),
body: GestureDetector(
onTap: () {