deal with user closing fragment while doing wallet stuff
This commit is contained in:
parent
fb62074d20
commit
952fb3a7f1
|
@ -280,6 +280,7 @@ public class LoginActivity extends Activity
|
|||
newWallet.close();
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
if (genFragment.isAdded())
|
||||
genFragment.showMnemonic(mnemonic);
|
||||
}
|
||||
});
|
||||
|
@ -290,6 +291,8 @@ public class LoginActivity extends Activity
|
|||
|
||||
@Override
|
||||
public void onAccept(final String name, final String password) {
|
||||
final GenerateFragment genFragment = (GenerateFragment)
|
||||
getFragmentManager().findFragmentById(R.id.fragment_container);
|
||||
File newWalletFolder = new File(getStorageRoot(), ".new");
|
||||
if (!newWalletFolder.isDirectory()) {
|
||||
Log.e(TAG, "New wallet dir " + newWalletFolder.getAbsolutePath() + "is not a directory");
|
||||
|
@ -324,6 +327,7 @@ public class LoginActivity extends Activity
|
|||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
if (rc) {
|
||||
if (genFragment.isAdded())
|
||||
getFragmentManager().popBackStack();
|
||||
Toast.makeText(LoginActivity.this,
|
||||
getString(R.string.generate_wallet_created), Toast.LENGTH_SHORT).show();
|
||||
|
|
Loading…
Reference in New Issue