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(); }