From ae0a77e6663198c3359c2e3ef4de98d700767b81 Mon Sep 17 00:00:00 2001 From: Jose Torres Date: Fri, 5 Feb 2016 17:20:31 -0600 Subject: [PATCH] - Done #367 --- .../order/CompleteOrderActivity.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/bentonow/bentonow/controllers/order/CompleteOrderActivity.java b/app/src/main/java/com/bentonow/bentonow/controllers/order/CompleteOrderActivity.java index b4982e3..b764b92 100644 --- a/app/src/main/java/com/bentonow/bentonow/controllers/order/CompleteOrderActivity.java +++ b/app/src/main/java/com/bentonow/bentonow/controllers/order/CompleteOrderActivity.java @@ -167,17 +167,20 @@ public void run() { protected void onResume() { mCurrentUser = userDao.getCurrentUser(); - getCurrentOrder(); - - if (mOrder == null || mOrder.OrderItems == null || mOrder.OrderItems.isEmpty()) { - Crashlytics.log(Log.ERROR, "Order", "No Items in the Order"); - emptyOrders(); - } else - updateBentoUI(false); + if (mCurrentUser == null) + onBackPressed(); + else { + getCurrentOrder(); - if (SharedPreferencesUtil.getBooleanPreference(SharedPreferencesUtil.IS_ORDER_AHEAD_MENU)) - setOAHashTimer(BentoNowUtils.showOATimer(mMenu)); + if (mOrder == null || mOrder.OrderItems == null || mOrder.OrderItems.isEmpty()) { + Crashlytics.log(Log.ERROR, "Order", "No Items in the Order"); + emptyOrders(); + } else + updateBentoUI(false); + if (SharedPreferencesUtil.getBooleanPreference(SharedPreferencesUtil.IS_ORDER_AHEAD_MENU)) + setOAHashTimer(BentoNowUtils.showOATimer(mMenu)); + } super.onResume(); }