Refactor ConnectionManager and DeviceInfoManager

This commit is contained in:
estevez-dev
2019-08-31 22:10:07 +03:00
parent 3e12f4f8a4
commit f9c37f5084
10 changed files with 64 additions and 64 deletions

View File

@ -47,7 +47,7 @@ class _CameraStreamViewState extends State<CameraStreamView> {
.entity;
started = true;
}
streamUrl = '${Connection().httpWebHost}/api/camera_proxy_stream/${_entity
streamUrl = '${ConnectionManager().httpWebHost}/api/camera_proxy_stream/${_entity
.entityId}?token=${_entity.attributes['access_token']}';
return Column(
children: <Widget>[

View File

@ -47,7 +47,7 @@ class _EntityHistoryWidgetState extends State<EntityHistoryWidget> {
}
if (_historyLastUpdated == null || now.difference(_historyLastUpdated).inSeconds > 30) {
_historyLastUpdated = now;
Connection().getHistory(entityId).then((history){
ConnectionManager().getHistory(entityId).then((history){
if (!_disposed) {
setState(() {
_history = history.isNotEmpty ? history[0] : [];