mirror of
https://codeberg.org/anoncontributorxmr/mysu.git
synced 2024-12-22 21:17:47 +00:00
Add toast when selecting node
This commit is contained in:
parent
56471c62f1
commit
7ca22077d6
2 changed files with 9 additions and 0 deletions
|
@ -1,10 +1,12 @@
|
||||||
package net.mynero.wallet.fragment.dialog;
|
package net.mynero.wallet.fragment.dialog;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
@ -74,6 +76,12 @@ public class NodeSelectionBottomSheetDialog extends BottomSheetDialogFragment im
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelectNode(Node node) {
|
public void onSelectNode(Node node) {
|
||||||
|
Activity activity = getActivity();
|
||||||
|
if(activity != null) {
|
||||||
|
activity.runOnUiThread(() -> {
|
||||||
|
Toast.makeText(activity, getString(R.string.node_selected), Toast.LENGTH_SHORT).show();
|
||||||
|
});
|
||||||
|
}
|
||||||
PrefService.getInstance().edit().putString(Constants.PREF_NODE, node.getAddress()).apply();
|
PrefService.getInstance().edit().putString(Constants.PREF_NODE, node.getAddress()).apply();
|
||||||
WalletManager.getInstance().setDaemon(node);
|
WalletManager.getInstance().setDaemon(node);
|
||||||
adapter.updateSelectedNode();
|
adapter.updateSelectedNode();
|
||||||
|
|
|
@ -96,4 +96,5 @@
|
||||||
<string name="transaction_destination">Destination</string>
|
<string name="transaction_destination">Destination</string>
|
||||||
<string name="confirmations">Confirmations</string>
|
<string name="confirmations">Confirmations</string>
|
||||||
<string name="date">Date</string>
|
<string name="date">Date</string>
|
||||||
|
<string name="node_selected">Node has been selected</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue