modify import success refresh
MODIFY
bither-android/src/net/bither/TrashCanActivity.java
bither-android/src/net/bither/TrashCanActivity.java
@@ -274,6 +274,9 @@ public class TrashCanActivity extends SwipeRightFragmentActivity {
notifyDataSetChanged();
if (AppSharedPreference.getInstance().getAppMode() ==
BitherjSettings.AppMode.HOT) {
+ if (BitherApplication.hotActivity == null) {
+ return;
+ }
Fragment f = BitherApplication.hotActivity
.getFragmentAtIndex(1);
if (f instanceof HotAddressFragment) {
@@ -282,6 +285,9 @@ public class TrashCanActivity extends SwipeRightFragmentActivity {
hotAddressFragment.refresh();
}
} else {
+ if (BitherApplication.coldActivity == null) {
+ return;
+ }
Fragment f = BitherApplication.coldActivity
.getFragmentAtIndex(1);
if (f instanceof ColdAddressFragment) {

MODIFY
bither-android/src/net/bither/activity/cold/ColdAdvanceActivity.java
bither-android/src/net/bither/activity/cold/ColdAdvanceActivity.java
@@ -878,10 +878,6 @@ public class ColdAdvanceActivity extends SwipeRightFragmentActivity {
hasAnyAction = false;
ssvImportPrivateKey.loadData();
ssvImprotBip38Key.loadData();
- DropdownMessage.showDropdownMessage(ColdAdvanceActivity.this,
- R.string.import_cold_private_key_qr_code_success, new Runnable() {
- @Override
- public void run() {
if (BitherApplication.coldActivity != null) {
Fragment f = BitherApplication.coldActivity.getFragmentAtIndex(1);
if (f != null && f instanceof Refreshable) {
@@ -889,6 +885,10 @@ public class ColdAdvanceActivity extends SwipeRightFragmentActivity {
r.doRefresh();
}
}
+ DropdownMessage.showDropdownMessage(ColdAdvanceActivity.this,
+ R.string.import_cold_private_key_qr_code_success, new Runnable() {
+ @Override
+ public void run() {
if (hasAnyAction) {
return;
}

MODIFY
bither-android/src/net/bither/activity/hot/HotAdvanceActivity.java
bither-android/src/net/bither/activity/hot/HotAdvanceActivity.java
@@ -205,8 +205,6 @@ public class HotAdvanceActivity extends SwipeRightFragmentActivity {
protected void onDestroy() {
unregisterReceiver(addressIsLoadingReceiver);
super.onDestroy();
- BitherApplication.hotActivity = null;
-
}
@Override
@@ -1513,10 +1511,6 @@ public class HotAdvanceActivity extends SwipeRightFragmentActivity {
hasAnyAction = false;
ssvImportPrivateKey.loadData();
ssvImprotBip38Key.loadData();
- DropdownMessage.showDropdownMessage(HotAdvanceActivity.this,
- R.string.import_private_key_qr_code_success, new Runnable() {
- @Override
- public void run() {
if (BitherApplication.hotActivity != null) {
Fragment f = BitherApplication.hotActivity.getFragmentAtIndex(1);
if (f != null && f instanceof Refreshable) {
@@ -1524,6 +1518,10 @@ public class HotAdvanceActivity extends SwipeRightFragmentActivity {
r.doRefresh();
}
}
+ DropdownMessage.showDropdownMessage(HotAdvanceActivity.this,
+ R.string.import_private_key_qr_code_success, new Runnable() {
+ @Override
+ public void run() {
if (hasAnyAction) {
return;
}

modify import success refresh