Commit a4c32df3 authored by T Dev. D's avatar T Dev. D 😎
Browse files

move Sorovan receive/collab menu entry to post-mix balance screen

parent 29be21b9
......@@ -11,8 +11,8 @@ android {
applicationId 'com.samourai.wallet'
minSdkVersion 21
targetSdkVersion 29
versionCode 173
versionName "0.99.95u"
versionCode 174
versionName "0.99.96"
// Enabling multidex support.
multiDexEnabled true
}
......@@ -57,16 +57,16 @@ android {
applicationId 'com.samourai.wallet'
minSdkVersion 21
targetSdkVersion 29
versionCode 173
versionName "0.99.95u"
versionCode 174
versionName "0.99.96"
resValue "string", "app_name", "Samourai"
resValue "string", "version_name", "0.99.95u"
resValue "string", "version_name", "0.99.96"
}
staging {
applicationId 'com.samourai.wallet.staging'
minSdkVersion 21
targetSdkVersion 29
versionCode 173
versionCode 174
versionName "0.99.96"
resValue "string", "app_name", "Samourai Staging"
resValue "string", "version_name", "0.99.96"
......
......@@ -55,6 +55,7 @@ import com.samourai.wallet.ReceiveActivity;
import com.samourai.wallet.SamouraiActivity;
import com.samourai.wallet.SamouraiWallet;
import com.samourai.wallet.paynym.fragments.PayNymOnBoardBottomSheet;
import com.samourai.wallet.send.soroban.meeting.SorobanMeetingListenActivity;
import com.samourai.wallet.settings.SettingsActivity;
import com.samourai.wallet.access.AccessFactory;
import com.samourai.wallet.api.APIFactory;
......@@ -697,6 +698,9 @@ public class BalanceActivity extends SamouraiActivity {
item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
}
else {
menu.findItem(R.id.action_soroban_collab).setVisible(false);
}
this.menu = menu;
return super.onCreateOptionsMenu(menu);
......@@ -726,11 +730,13 @@ public class BalanceActivity extends SamouraiActivity {
try {
Intent cahootIntent = ManualCahootsActivity.createIntentResume(this, account, clipItem.getText().toString().trim());
startActivity(cahootIntent);
} catch (Exception e) {
}
catch (Exception e) {
Toast.makeText(this,R.string.cannot_process_cahoots,Toast.LENGTH_SHORT).show();
e.printStackTrace();
}
}else {
}
else {
Toast.makeText(this,R.string.cannot_process_cahoots,Toast.LENGTH_SHORT).show();
}
}
......@@ -740,22 +746,28 @@ public class BalanceActivity extends SamouraiActivity {
}
if (id == R.id.action_settings) {
doSettings();
} else if (id == R.id.action_support) {
}
else if (id == R.id.action_support) {
doSupport();
} else if (id == R.id.action_sweep) {
}
else if (id == R.id.action_sweep) {
if (!AppUtil.getInstance(BalanceActivity.this).isOfflineMode()) {
doSweep();
} else {
}
else {
Toast.makeText(BalanceActivity.this, R.string.in_offline_mode, Toast.LENGTH_SHORT).show();
}
} else if (id == R.id.action_utxo) {
}
else if (id == R.id.action_utxo) {
doUTXO();
} else if (id == R.id.action_backup) {
}
else if (id == R.id.action_backup) {
if (SamouraiWallet.getInstance().hasPassphrase(BalanceActivity.this)) {
if (HD_WalletFactory.getInstance(BalanceActivity.this).get() != null && SamouraiWallet.getInstance().hasPassphrase(BalanceActivity.this)) {
doBackup();
} else {
}
else {
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this);
builder.setMessage(R.string.passphrase_needed_for_backup).setCancelable(false);
......@@ -772,19 +784,28 @@ public class BalanceActivity extends SamouraiActivity {
}
}
} else {
}
else {
Toast.makeText(BalanceActivity.this, R.string.passphrase_required, Toast.LENGTH_SHORT).show();
}
} else if (id == R.id.action_scan_qr) {
}
else if (id == R.id.action_scan_qr) {
doScan();
} else if (id == R.id.action_postmix) {
}
else if (id == R.id.action_postmix) {
Intent intent = new Intent(BalanceActivity.this, SendActivity.class);
intent.putExtra("_account", WhirlpoolMeta.getInstance(BalanceActivity.this).getWhirlpoolPostmix());
startActivity(intent);
} else {
}
else if(id == R.id.action_soroban_collab) {
Intent intent = new Intent(this, SorobanMeetingListenActivity.class);
intent.putExtra("_account", WhirlpoolMeta.getInstance(BalanceActivity.this).getWhirlpoolPostmix());
startActivity(intent);
}
else {
;
}
return super.onOptionsItemSelected(item);
......
......@@ -2250,9 +2250,6 @@ public class SendActivity extends SamouraiActivity {
menu.findItem(R.id.action_ricochet).setVisible(false);
menu.findItem(R.id.action_empty_ricochet).setVisible(false);
}
else {
menu.findItem(R.id.action_soroban_collab).setVisible(false);
}
if (account == WhirlpoolMeta.getInstance(getApplication()).getWhirlpoolPostmix()) {
MenuItem item = menu.findItem(R.id.action_send_menu_account);
......@@ -2284,24 +2281,25 @@ public class SendActivity extends SamouraiActivity {
// noinspection SimplifiableIfStatement
if (id == R.id.action_scan_qr) {
doScan();
} else if (id == R.id.action_ricochet) {
}
else if (id == R.id.action_ricochet) {
Intent intent = new Intent(SendActivity.this, RicochetActivity.class);
startActivity(intent);
} else if (id == R.id.action_empty_ricochet) {
}
else if (id == R.id.action_empty_ricochet) {
emptyRicochetQueue();
} else if (id == R.id.action_utxo) {
}
else if (id == R.id.action_utxo) {
doUTXO();
} else if (id == R.id.action_fees) {
}
else if (id == R.id.action_fees) {
doFees();
} else if (id == R.id.action_batch) {
}
else if (id == R.id.action_batch) {
doBatchSpend();
} else if (id == R.id.action_support) {
doSupport();
}
else if(id == R.id.action_soroban_collab) {
Intent intent = new Intent(this, SorobanMeetingListenActivity.class);
intent.putExtra("_account", WhirlpoolMeta.getInstance(SendActivity.this).getWhirlpoolPostmix());
startActivity(intent);
else if (id == R.id.action_support) {
doSupport();
}
else {
;
......
......@@ -83,6 +83,11 @@
android:orderInCategory="100"
android:title="Paste cahoots payload"
app:showAsAction="never" />
<item
android:id="@+id/action_soroban_collab"
android:orderInCategory="100"
android:title="@string/options_soroban_collab"
app:showAsAction="never" />
<item
android:id="@+id/action_support"
android:orderInCategory="100"
......
......@@ -44,11 +44,6 @@
android:orderInCategory="100"
android:showAsAction="never"
/>
<item
android:id="@+id/action_soroban_collab"
android:orderInCategory="100"
android:title="@string/options_soroban_collab"
app:showAsAction="never" />
<item android:id="@+id/action_support"
android:title="@string/action_support"
android:orderInCategory="100"
......
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