feat(core): Remove resumed from connection state change events
This commit is contained in:
		
							parent
							
								
									1d87c0ce95
								
							
						
					
					
						commit
						c6552968d5
					
				| @ -5,6 +5,7 @@ | ||||
| - **BREAKING**: Removed support for XEP-0414, as the (supported) hash computations are already implemented by `CryptographicHashManager.hashFromData`. | ||||
| - The `DiscoManager` now only handled entity capabilities if a `EntityCapabilityManager` is registered. | ||||
| - The `EntityCapabilityManager` now verifies and validates its data before caching. | ||||
| - **BREAKING**: Added the `resumed` parameter to `StreamNegotiationsDoneEvent`. Use this to check if the current stream is new or resumed instead of using the `ConnectionStateChangedEvent`. | ||||
| 
 | ||||
| ## 0.3.1 | ||||
| 
 | ||||
|  | ||||
| @ -15,7 +15,6 @@ import 'package:moxxmpp/src/managers/base.dart'; | ||||
| import 'package:moxxmpp/src/managers/data.dart'; | ||||
| import 'package:moxxmpp/src/managers/handlers.dart'; | ||||
| import 'package:moxxmpp/src/managers/namespaces.dart'; | ||||
| import 'package:moxxmpp/src/negotiators/namespaces.dart'; | ||||
| import 'package:moxxmpp/src/negotiators/negotiator.dart'; | ||||
| import 'package:moxxmpp/src/parser.dart'; | ||||
| import 'package:moxxmpp/src/presence.dart'; | ||||
| @ -28,7 +27,6 @@ import 'package:moxxmpp/src/stanza.dart'; | ||||
| import 'package:moxxmpp/src/stringxml.dart'; | ||||
| import 'package:moxxmpp/src/types/result.dart'; | ||||
| import 'package:moxxmpp/src/xeps/xep_0030/xep_0030.dart'; | ||||
| import 'package:moxxmpp/src/xeps/xep_0198/negotiator.dart'; | ||||
| import 'package:moxxmpp/src/xeps/xep_0198/xep_0198.dart'; | ||||
| import 'package:moxxmpp/src/xeps/xep_0352.dart'; | ||||
| import 'package:synchronized/synchronized.dart'; | ||||
| @ -611,15 +609,10 @@ class XmppConnection { | ||||
|       _destroyConnectingTimer(); | ||||
|     } | ||||
| 
 | ||||
|     final sm = | ||||
|         _negotiationsHandler.getNegotiatorById<StreamManagementNegotiator>( | ||||
|       streamManagementNegotiator, | ||||
|     ); | ||||
|     await _sendEvent( | ||||
|       ConnectionStateChangedEvent( | ||||
|         state, | ||||
|         oldState, | ||||
|         sm?.isResumed ?? false, | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
|  | ||||
| @ -22,10 +22,9 @@ abstract class XmppEvent {} | ||||
| /// Triggered when the connection state of the XmppConnection has | ||||
| /// changed. | ||||
| class ConnectionStateChangedEvent extends XmppEvent { | ||||
|   ConnectionStateChangedEvent(this.state, this.before, this.resumed); | ||||
|   ConnectionStateChangedEvent(this.state, this.before); | ||||
|   final XmppConnectionState before; | ||||
|   final XmppConnectionState state; | ||||
|   final bool resumed; | ||||
| 
 | ||||
|   /// Indicates whether the connection state switched from a not connected state to a | ||||
|   /// connected state. | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user