Merge pull request 'Upgrade Cwtch' (#727) from stable-blockers into trunk
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Reviewed-on: #727 Reviewed-by: Dan Ballard <dan@openprivacy.ca>
This commit is contained in:
commit
7b9dcf0a8b
|
@ -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);
|
Provider.of<FlwtchState>(context, listen: false).cwtch.DeactivatePeerEngine(onion);
|
||||||
this.contactList.contacts.forEach((element) {
|
this.contactList.contacts.forEach((element) {
|
||||||
element.status = "Disconnected";
|
element.status = "Disconnected";
|
||||||
|
// reset retry time to allow for instant reconnection...
|
||||||
|
element.lastRetryTime = element.loaded;
|
||||||
});
|
});
|
||||||
this.serverList.servers.forEach((element) {
|
this.serverList.servers.forEach((element) {
|
||||||
element.status = "Disconnected";
|
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
|
// 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)
|
// 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
|
// 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) ||
|
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<ProfileInfoState>(context, listen: false).appearOffline &&
|
||||||
(Provider.of<ContactInfoState>(context, listen: false).lastRetryTime == Provider.of<ContactInfoState>(context, listen: false).loaded);
|
(Provider.of<ContactInfoState>(context, listen: false).lastRetryTime == Provider.of<ContactInfoState>(context, listen: false).loaded));
|
||||||
|
|
||||||
var reconnectButton = Padding(
|
var reconnectButton = Padding(
|
||||||
padding: EdgeInsets.all(2),
|
padding: EdgeInsets.all(2),
|
||||||
|
|
Loading…
Reference in New Issue