This GitLab instance reached the end of its service life. It won't be possible to create new users or projects.

Please read the deprecation notice for more information concerning the deprecation timeline

Visit migration.git.tu-berlin.de (internal network only) to import your old projects to the new GitLab platform 📥

various bugfixes

* [TABLET] app closing after buying an item
* [TABLET] favorite button resetting after changing item
* hide deposit chooser for items without deposit
parent 1bcaa105
......@@ -8,7 +8,7 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
versionCode 6
versionCode 7
versionName "1.2"
}
......
......@@ -154,7 +154,8 @@ implements SeekBar.OnSeekBarChangeListener, OnItemSelectedListener {
// no JSON result: error
Toast.makeText(getActivity(), getString(R.string.buy_fail), Toast.LENGTH_LONG).show();
}
getActivity().finish();
if(getActivity() instanceof BuyScreenActivity)
getActivity().finish();
}
},
new Response.ErrorListener() {
......@@ -210,20 +211,21 @@ implements SeekBar.OnSeekBarChangeListener, OnItemSelectedListener {
}
});
if(favorite > 0) {
mFavorite = true;
getActivity().invalidateOptionsMenu();
}
mFavorite = favorite > 0;
mPriceVal = price;
mDepositVal = deposit;
mMultiplier = 1;
mItemID = id;
mDepositChooser.setVisibility(deposit == 0 ? View.INVISIBLE: View.VISIBLE);
mDeposit.setVisibility(deposit == 0 ? View.INVISIBLE : View.VISIBLE);
updateText();
mDescText.setText(description);
if(getActivity() instanceof BuyScreenActivity)
getActivity().getActionBar().setTitle(name);
if(getActivity() instanceof BuyScreenActivity) {
mName.setText(name);
getActivity().getActionBar().setTitle(name);
}
else
mName.setText(name);
mBuy.setEnabled(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment