add refresh button to pending page
All checks were successful
Release / meta (push) Successful in 7s
Release / linux-build (push) Successful in 50s
Release / web-build (push) Successful in 2m23s
Release / android-build (push) Successful in 7m48s
Release / release-master (push) Successful in 18s
Release / release-dev (push) Successful in 20s
All checks were successful
Release / meta (push) Successful in 7s
Release / linux-build (push) Successful in 50s
Release / web-build (push) Successful in 2m23s
Release / android-build (push) Successful in 7m48s
Release / release-master (push) Successful in 18s
Release / release-dev (push) Successful in 20s
This commit is contained in:
@@ -4,6 +4,7 @@ enum _TractionMoreAction {
|
||||
classStats,
|
||||
classLeaderboard,
|
||||
adminPending,
|
||||
adminPendingChanges,
|
||||
}
|
||||
|
||||
class TractionPage extends StatefulWidget {
|
||||
@@ -708,6 +709,19 @@ class _TractionPageState extends State<TractionPage> {
|
||||
);
|
||||
}
|
||||
break;
|
||||
case _TractionMoreAction.adminPendingChanges:
|
||||
final messenger = ScaffoldMessenger.of(context);
|
||||
try {
|
||||
await context.push('/traction/changes');
|
||||
} catch (_) {
|
||||
if (!mounted) return;
|
||||
messenger.showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Unable to open pending changes'),
|
||||
),
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
itemBuilder: (context) {
|
||||
@@ -765,6 +779,12 @@ class _TractionPageState extends State<TractionPage> {
|
||||
),
|
||||
),
|
||||
);
|
||||
items.add(
|
||||
const PopupMenuItem(
|
||||
value: _TractionMoreAction.adminPendingChanges,
|
||||
child: Text('Pending changes'),
|
||||
),
|
||||
);
|
||||
}
|
||||
return items;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user