Skip to content

Commit

Permalink
- Done #403
Browse files Browse the repository at this point in the history
- Done #401
- Done #400
- Done #398
- Done #396
- Done #394
- Done #393
- Done #385
- Done #384
- Done #383
- Done #381
- Done #379
- Done #377
- Done #368
- Done #364
- Done #365
- Done #360
- Done #355
- Done #354
  • Loading branch information
Jose Torres committed Feb 5, 2016
1 parent 16d08db commit 788a43b
Show file tree
Hide file tree
Showing 22 changed files with 527 additions and 264 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public void onClick(View v) {

@Override
public void show() {
// TODO 自动生成的方法存根
super.show();
// set dialog enter animations
view.startAnimation(AnimationUtils.loadAnimation(context, R.anim.dialog_main_show_amination));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ public void onClick(View v) {

@Override
public void show() {
// TODO 自动生成的方法存根
super.show();
// set dialog enter animations
view.startAnimation(AnimationUtils.loadAnimation(context, R.anim.dialog_main_show_amination));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public boolean onTouch(View v, MotionEvent event) {

@Override
public void show() {
// TODO 自动生成的方法存根
super.show();
// set dialog enter animations
view.startAnimation(AnimationUtils.loadAnimation(context, R.anim.dialog_main_show_amination));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@
import com.bentonow.bentonow.controllers.help.HelpActivity;
import com.bentonow.bentonow.dao.IosCopyDao;
import com.bentonow.bentonow.dao.MenuDao;
import com.bentonow.bentonow.dao.SettingsDao;
import com.bentonow.bentonow.listener.ListenerWebRequest;
import com.bentonow.bentonow.listener.OnCustomDragListener;
import com.bentonow.bentonow.model.AutoCompleteModel;
import com.bentonow.bentonow.model.Order;
import com.bentonow.bentonow.parse.InitParse;
import com.bentonow.bentonow.ui.BackendTextView;
import com.bentonow.bentonow.web.request.RequestGetPlaceDetail;
Expand Down Expand Up @@ -364,11 +366,17 @@ private boolean isValidLocation() {
return bIsValid;
}

private void getMenusByLocation() {
DebugUtils.logDebug(TAG, "onContinuePressed AppState " + MenuDao.gateKeeper.getAppState());
BentoNowUtils.saveOrderLocation(mLastOrderLocation, mOrderAddress);
private void getMenusByLocation(String responseString) {
InitParse.parseInitTwo(responseString);

SharedPreferencesUtil.setAppPreference(SharedPreferencesUtil.POD_MODE, SettingsDao.getCurrent().pod_mode);
SharedPreferencesUtil.setAppPreference(SharedPreferencesUtil.STORE_STATUS, MenuDao.gateKeeper.getAppState());

if (optOpenScreen != ConstantUtils.optOpenScreen.SUMMARY)
BentoNowUtils.saveOrderLocation(mLastOrderLocation, mOrderAddress);

DebugUtils.logDebug(TAG, "onContinuePressed AppState " + MenuDao.gateKeeper.getAppState());

if (MenuDao.gateKeeper.getAppState().contains("map,no_service")) {
Intent mIntentBummer = new Intent(DeliveryLocationActivity.this, BummerActivity.class);
mIntentBummer.putExtra(BummerActivity.TAG_INVALID_ADDRESS, getTxtAddress().getText().toString());
Expand All @@ -382,11 +390,7 @@ private void getMenusByLocation() {
e.printStackTrace();
}
} else if (MenuDao.gateKeeper.getAppState().contains("build")) {

switch (optOpenScreen) {
case NORMAL:
onBackPressed();
break;
case COMPLETE_ORDER:
if (BentoNowUtils.isValidCompleteOrder(DeliveryLocationActivity.this))
BentoNowUtils.openCompleteOrderActivity(DeliveryLocationActivity.this, MenuDao.getCurrentMenu());
Expand All @@ -395,6 +399,13 @@ private void getMenusByLocation() {
BentoNowUtils.openBuildBentoActivity(DeliveryLocationActivity.this);
break;
case SUMMARY:
BentoNowUtils.saveOrderLocation(mLastOrderLocation, mOrderAddress);
if (SharedPreferencesUtil.getBooleanPreference(SharedPreferencesUtil.IS_ORDER_AHEAD_MENU))
BentoNowUtils.openBuildBentoActivity(DeliveryLocationActivity.this);
else
onBackPressed();
break;
default:
onBackPressed();
break;
}
Expand Down Expand Up @@ -428,8 +439,23 @@ public void onFailure(int statusCode, Header[] headers, String responseString, T
public void onSuccess(int statusCode, Header[] headers, String responseString) {
onFinish();

InitParse.parseInitTwo(responseString);
getMenusByLocation();
switch (optOpenScreen) {
case SUMMARY:
Order mCurrentOrder = mOrderDao.getCurrentOrder();
if (SharedPreferencesUtil.getBooleanPreference(SharedPreferencesUtil.IS_ORDER_AHEAD_MENU))
if (mCurrentOrder != null && responseString.contains("\"menu_id\":\"" + mCurrentOrder.MenuId + "\"")) {
BentoNowUtils.saveOrderLocation(mLastOrderLocation, mOrderAddress);
onBackPressed();
} else {
getMenusByLocation(responseString);
}
else
getMenusByLocation(responseString);
break;
default:
getMenusByLocation(responseString);
break;
}

}

Expand Down
Loading

0 comments on commit 788a43b

Please sign in to comment.