From fbf72a0afe8c5ace1c5d0e692fe1684cc4fd9614 Mon Sep 17 00:00:00 2001 From: Marcin Szalek Date: Wed, 11 Oct 2017 06:18:01 +0200 Subject: [PATCH] Name refactor --- lib/logic/redux_core.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/logic/redux_core.dart b/lib/logic/redux_core.dart index f1ba9f2..38a6bd8 100644 --- a/lib/logic/redux_core.dart +++ b/lib/logic/redux_core.dart @@ -49,7 +49,8 @@ class ReduxState { ReduxState stateReducer(ReduxState state, action) { if (action is InitAction) { FirebaseDatabase.instance.setPersistenceEnabled(true); - _loginAnonymous(state).then((nil) => _updateFirebaseAuth(state, action)); + _loginAnonymous(state).then((nil) => + _updateFirebaseDatabase(state, action)); } else if (action is LocalAddAction) { _addEntry(state, action.weightEntry); } else if (action is LocalEditAction) { @@ -73,7 +74,7 @@ Future _loginAnonymous(ReduxState state) async { } } -_updateFirebaseAuth(ReduxState state, InitAction action) async { +_updateFirebaseDatabase(ReduxState state, InitAction action) async { state.mainReference = FirebaseDatabase.instance .reference() .child(state.firebaseUser.uid)