Fix state handling on entity view page

This commit is contained in:
estevez
2018-09-29 17:59:38 +03:00
parent 6834f2ca34
commit 2fcd27d240
4 changed files with 19 additions and 4 deletions

View File

@ -144,7 +144,7 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver {
if (_stateSubscription != null) _stateSubscription.cancel();
_stateSubscription = eventBus.on<StateChangedEvent>().listen((event) {
setState(() {
if (event.setToCollection) {
if (event.localChange) {
_entities
.get(event.entityId)
.state = event.newState;