Upgrade Cwtch
continuous-integration/drone/pr Build is pending
Details
continuous-integration/drone/pr Build is pending
Details
This commit is contained in:
parent
877a4e4fb3
commit
0b7a75a243
|
@ -1 +1 @@
|
|||
2023-09-19-13-05-v0.0.7
|
||||
2023-09-19-17-02-v0.0.8
|
|
@ -486,6 +486,8 @@ class ProfileInfoState extends ChangeNotifier {
|
|||
Provider.of<FlwtchState>(context, listen: false).cwtch.DeactivatePeerEngine(onion);
|
||||
this.contactList.contacts.forEach((element) {
|
||||
element.status = "Disconnected";
|
||||
// reset retry time to allow for instant reconnection...
|
||||
element.lastRetryTime = element.loaded;
|
||||
});
|
||||
this.serverList.servers.forEach((element) {
|
||||
element.status = "Disconnected";
|
||||
|
|
|
@ -51,9 +51,9 @@ class _MessageListState extends State<MessageList> {
|
|||
// OR if users have never clicked the button AND they appear offline, then they can click the button
|
||||
// NOTE: all these listeners are false...this is not ideal, but if they were true we would end up rebuilding the message view every tick (which would kill performance)
|
||||
// any significant changes in state e.g. peer offline or button clicks will trigger a rebuild anyway
|
||||
bool canReconnect = DateTime.now().difference(Provider.of<ContactInfoState>(context, listen: false).lastRetryTime).abs() > Duration(seconds: 60) ||
|
||||
Provider.of<ProfileInfoState>(context, listen: false).appearOffline &&
|
||||
(Provider.of<ContactInfoState>(context, listen: false).lastRetryTime == Provider.of<ContactInfoState>(context, listen: false).loaded);
|
||||
bool canReconnect = DateTime.now().difference(Provider.of<ContactInfoState>(context, listen: false).lastRetryTime).abs() > Duration(seconds: 30) ||
|
||||
(Provider.of<ProfileInfoState>(context, listen: false).appearOffline &&
|
||||
(Provider.of<ContactInfoState>(context, listen: false).lastRetryTime == Provider.of<ContactInfoState>(context, listen: false).loaded));
|
||||
|
||||
var reconnectButton = Padding(
|
||||
padding: EdgeInsets.all(2),
|
||||
|
|
Loading…
Reference in New Issue