Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove mixin settings #320

Merged
merged 1 commit into from
Jun 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -309,13 +309,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