Skip to content

Commit

Permalink
remove mixin settings (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
m2049r authored Jun 17, 2018
1 parent 817816c commit 008f069
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
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();
Expand All @@ -54,15 +55,12 @@ interface Listener {
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;
Expand All @@ -77,7 +75,6 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
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);
Expand All @@ -104,7 +101,7 @@ public boolean onValidateFields() {
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;
Expand Down
12 changes: 1 addition & 11 deletions app/src/main/res/layout/fragment_send_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 0 additions & 7 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 008f069

Please sign in to comment.