calculate server progress based on last message, nowtime, and message flow; display progress on group contact and remote server #340
No reviewers
Labels
No Label
android
arch
backlog
blocked-on-external
bug
bugbash
component/bindings
component/bine
component/connectivity
component/cwtch
component/tapir
component/ui
cwtch-1.14
cwtch-1.15
cwtch-beta-1.1
cwtch-beta-1.10
cwtch-beta-1.11
cwtch-beta-1.12
cwtch-beta-1.13
cwtch-beta-1.2
cwtch-beta-1.3
cwtch-beta-1.4
cwtch-beta-1.5
cwtch-beta-1.5.x
cwtch-beta-1.6
cwtch-beta-1.7
cwtch-beta-1.8
cwtch-beta-1.9
design
duplicate
enhancement
flutter
funding-needed
help wanted
hybrid-groups
in-nightly
in-progress
invalid
ios
linux
mac
need-replication-or-investigation
ops
packaging
post-stable
question
questionable
requires-more-effort-than-we-can-spare
rust
scheduled
stable-blocker
tails
testing-needed
tests
tor
waiting-on-fix-confirmation
waiting-on-new-flutter-feature
whonix
windows
wontfix
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cwtch.im/cwtch-ui#340
Loading…
Reference in New Issue
No description provided.
Delete Branch "serverProgress"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
also remoteServer should have been its own model so now is
Drone Build Status: failure
https://build.openprivacy.ca/cwtch.im/cwtch-ui/530
d93287d937
toa4ce168aec
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch-ui/531
Let's not pollute contact with server specific fields. Instead have whatever needs to refer to
_serverSyncProgress
lookup_server
and if it exists then consult the server model instead.@ -26,6 +26,7 @@ class ContactInfoState extends ChangeNotifier {
// todo: a nicer way to model contacts, groups and other "entities"
late bool _isGroup;
String? _server;
double _serverSyncProgress = 0.0;
this doesn't belong here
@ -0,0 +42,4 @@
notifyListeners();
}
void updateSyncProgressFor(DateTime point) {
comment this explaining the logic
@ -0,0 +46,4 @@
var range = lastPreSyncMessagTime.difference(DateTime.now());
var pointFromStart = lastPreSyncMessagTime.difference(point);
syncProgress = pointFromStart.inSeconds / range.inSeconds * 100;
groups.forEach((g) { g.serverSyncProgress = syncProgress;});
As above, forcing contacts to have a field to track sync progress isn't great - considering they already have an optional server handle. Groups shouldn't store this information, servers should.
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch-ui/534