Fixed build issue
This commit is contained in:
parent
c2da85e7f0
commit
ed9ee153ba
1 changed files with 6 additions and 6 deletions
|
@ -22,7 +22,9 @@ class _SessionsPageState extends State<SessionsPage> {
|
|||
|
||||
@override
|
||||
void initState() {
|
||||
_fetchActiveSessions();
|
||||
_fetchActiveSessions().onError((error, stackTrace) {
|
||||
showToast(context, "Failed to fetch active sessions");
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
|
@ -115,9 +117,9 @@ class _SessionsPageState extends State<SessionsPage> {
|
|||
await UserService.instance.terminateSession(session.token);
|
||||
await _fetchActiveSessions();
|
||||
await dialog.hide();
|
||||
} catch (e, s) {
|
||||
} catch (e) {
|
||||
await dialog.hide();
|
||||
_logger.severe('failed to terminate', e, s);
|
||||
_logger.severe('failed to terminate');
|
||||
showErrorDialog(
|
||||
context,
|
||||
'Oops',
|
||||
|
@ -129,9 +131,7 @@ class _SessionsPageState extends State<SessionsPage> {
|
|||
Future<void> _fetchActiveSessions() async {
|
||||
_sessions = await UserService.instance.getActiveSessions().onError((e, s) {
|
||||
_logger.severe("failed to fetch active sessions", e, s);
|
||||
if (mounted) {
|
||||
showToast(context, "Failed to fetch active sessions");
|
||||
}
|
||||
throw e!;
|
||||
});
|
||||
if (_sessions != null) {
|
||||
_sessions!.sessions.sort((first, second) {
|
||||
|
|
Loading…
Add table
Reference in a new issue