Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MobileEventLog
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Data-Logistics-Support
MobileEventLog
Commits
55fe0ea9
Commit
55fe0ea9
authored
2 years ago
by
Maximilian Betz
Browse files
Options
Downloads
Patches
Plain Diff
cleanup
parent
aff8e325
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/configuration.dart
+3
-6
3 additions, 6 deletions
lib/configuration.dart
lib/viewevents.dart
+1
-6
1 addition, 6 deletions
lib/viewevents.dart
with
4 additions
and
12 deletions
lib/configuration.dart
+
3
−
6
View file @
55fe0ea9
...
...
@@ -83,7 +83,8 @@ class _MyHomePageState extends State<Configuration> {
await
configuration
.
storeToSharedPrefs
();
debugPrint
(
'Configuration stored!'
);
_status
=
'Login success & configuration stored'
;
setState
(()
{});
}
on
SocketException
catch
(
e
)
{
debugPrint
(
'Exception:
$e
'
);
...
...
@@ -94,10 +95,6 @@ class _MyHomePageState extends State<Configuration> {
_status
=
'
$e
'
;
setState
(()
{});
}
_status
=
'Success. Login valid, configuration stored'
;
setState
(()
{});
return
;
}
Future
<
void
>
fetchInitData
()
async
{
...
...
@@ -278,6 +275,6 @@ class _MyHomePageState extends State<Configuration> {
}
//TODO: write configuration on app dispose!
//TODO: display mission internet connection properly.
//TODO: grey out update button if nothing has changed. ?
\ No newline at end of file
This diff is collapsed.
Click to expand it.
lib/viewevents.dart
+
1
−
6
View file @
55fe0ea9
...
...
@@ -23,11 +23,6 @@ class _ViewEvents extends State<ViewEvents> {
localEvents
=
await
database
.
getEvents
();
int
pendingEventCnt
=
await
database
.
getPendingEventCnt
();
debugPrint
(
"Database Events: "
);
for
(
var
event
in
localEvents
){
debugPrint
(
event
.
toString
());
}
_syncStatus
=
pendingEventCnt
.
toString
()
+
' event(s) pending'
;
setState
(()
{});
//Got events from database, so update UI
}
...
...
@@ -67,7 +62,7 @@ class _ViewEvents extends State<ViewEvents> {
'put success, remaining events: '
+
syncCounter
.
toString
());
event
.
status
=
'EXPORTED'
;
//Update event to export only once
database
.
updateEvent
(
event
);
//Update Event as exported in SQL Database
fetchEventsFromDb
();
//update view list //TODO: this is bad for the sync performance!
Consider working with localevent list for the UI!
fetchEventsFromDb
();
//update view list //TODO: this is bad for the sync performance!
setState
(()
{});
}
else
{
throw
Exception
(
'Sync for '
+
event
.
urn
+
'failed'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment