remove mixin settings (#320)

This commit is contained in:
m2049r 2018-06-17 13:22:29 +02:00 committed by GitHub
parent 817816cd34
commit 008f06959c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 23 deletions

View File

@ -36,6 +36,7 @@ import com.m2049r.xmrwallet.util.UserNotes;
import timber.log.Timber;
public class SendSettingsWizardFragment extends SendWizardFragment {
final static public int MIXIN = 6;
public static SendSettingsWizardFragment newInstance(Listener listener) {
SendSettingsWizardFragment instance = new SendSettingsWizardFragment();
@ -54,15 +55,12 @@ public class SendSettingsWizardFragment extends SendWizardFragment {
TxData getTxData();
}
// Mixin = Ringsize - 1
final static int Mixins[] = {6, 9, 12, 25}; // must match the layout XML / "@array/mixin"
final static PendingTransaction.Priority Priorities[] =
{PendingTransaction.Priority.Priority_Default,
PendingTransaction.Priority.Priority_Low,
PendingTransaction.Priority.Priority_Medium,
PendingTransaction.Priority.Priority_High}; // must match the layout XML
private Spinner sMixin;
private Spinner sPriority;
private EditText etNotes;
private EditText etDummy;
@ -77,7 +75,6 @@ public class SendSettingsWizardFragment extends SendWizardFragment {
View view = inflater.inflate(
R.layout.fragment_send_settings, container, false);
sMixin = (Spinner) view.findViewById(R.id.sMixin);
sPriority = (Spinner) view.findViewById(R.id.sPriority);
etNotes = (EditText) view.findViewById(R.id.etNotes);
@ -104,7 +101,7 @@ public class SendSettingsWizardFragment extends SendWizardFragment {
if (sendListener != null) {
TxData txData = sendListener.getTxData();
txData.setPriority(Priorities[sPriority.getSelectedItemPosition()]);
txData.setMixin(Mixins[sMixin.getSelectedItemPosition()]);
txData.setMixin(MIXIN);
txData.setUserNotes(new UserNotes(etNotes.getText().toString()));
}
return true;

View File

@ -27,20 +27,10 @@
android:text="@string/label_send_settings_advanced"
android:textAlignment="textEnd" />
<Spinner
android:id="@+id/sMixin"
style="@style/MoneroSpinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:entries="@array/mixin"
android:textAlignment="center" />
<Spinner
android:id="@+id/sPriority"
style="@style/MoneroSpinner"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:entries="@array/priority"

View File

@ -311,13 +311,6 @@
<string name="archive_alert_yes">Yes, do that!</string>
<string name="archive_alert_no">No thanks!</string>
<string-array name="mixin" translatable="false">
<item>Ringsize 7</item>
<item>Ringsize 10</item>
<item>Ringsize 13</item>
<item>Ringsize 26</item>
</string-array>
<string-array name="priority">
<item>Priority Default</item>
<item>Priority Low</item>