mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 06:07:57 -06:00
fix: Small fix related to account switching
This commit is contained in:
@@ -203,15 +203,8 @@ class ManageAccountsPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
_onSwitchAccount(BuildContext context, String currentUser, String newUser) async {
|
||||
final navigator = Navigator.of(context);
|
||||
if (currentUser == newUser) return;
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const SwitchingAccountsPage(),
|
||||
),
|
||||
);
|
||||
await context.read<AuthenticationCubit>().switchAccount(newUser);
|
||||
navigator.popUntil((route) => route.isFirst);
|
||||
Navigator.of(context).pop();
|
||||
context.read<AuthenticationCubit>().switchAccount(newUser);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user