mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
Added life cycle notification for the app to toggle auto backup upon opening app
This commit is contained in:
parent
2a4d4ea999
commit
02e19e2d2c
4 changed files with 10669 additions and 24 deletions
|
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/modules/home/providers/asset.provider.dart';
|
||||
import 'package:immich_mobile/modules/login/providers/authentication.provider.dart';
|
||||
import 'package:immich_mobile/shared/ui/immich_toast.dart';
|
||||
|
||||
|
|
@ -110,6 +111,9 @@ class LoginButton extends ConsumerWidget {
|
|||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return ElevatedButton(
|
||||
onPressed: () async {
|
||||
// This will remove current cache asset state of previous user login.
|
||||
ref.watch(assetProvider.notifier).clearAllAsset();
|
||||
|
||||
var isAuthenicated = await ref
|
||||
.read(authenticationProvider.notifier)
|
||||
.login(emailController.text, passwordController.text, serverEndpointController.text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue