Erweiterungen
This commit is contained in:
1 parent
ab86295bd5
commit
d0892e552e
3 files changed
+133
-150
No files matched your search
@@ -91,6 +91,12 @@ class _MainPageState extends State<MainPage> {
|
||||
_initMessages();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
|
||||
_exitMessages();
|
||||
}
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Stack(
|
||||
@@ -205,7 +211,7 @@ class _MainPageState extends State<MainPage> {
|
||||
getDefaultButton(
|
||||
'Abmelden',
|
||||
image: Image.asset('assets/abmelden.png', width: 30, height: 30),
|
||||
() => {}),
|
||||
() async => {showAcceptJobsPopup(context, await MyApp.isarInstance.jobs.filter().stateEqualTo(0).findAll())}),
|
||||
Expanded(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
@@ -255,6 +261,12 @@ class _MainPageState extends State<MainPage> {
|
||||
});
|
||||
}
|
||||
|
||||
void _exitMessages() {
|
||||
BroadcastReceiver().unsubscribe<StatusInfoUpdate>(Constants.messageTopicStatusInfoUpdate);
|
||||
|
||||
BroadcastReceiver().unsubscribe<StatusInfoUpdate>(Constants.messageTopicJobReceived);
|
||||
}
|
||||
|
||||
void _refreshBadges() async {
|
||||
_assignedJobsValueNotifier.value = await MyApp.isarInstance.jobs.filter().stateEqualTo(0).count();
|
||||
_acceptedJobsValueNotifier.value = await MyApp.isarInstance.jobs.filter().stateEqualTo(1).count();
|
||||
@@ -268,7 +280,7 @@ class _MainPageState extends State<MainPage> {
|
||||
}
|
||||
}
|
||||
|
||||
void _showAcceptanceDialog(Job job) {
|
||||
showAcceptJobsPopup(context);
|
||||
void _showAcceptanceDialog(Job job) async {
|
||||
await showAcceptJobsPopup(context, await MyApp.isarInstance.jobs.filter().stateEqualTo(0).findAll());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user