Fix crashbug and update gradle for release update.

normalize-wc-v2-dialog-ui
James Brown 2 years ago committed by Seaborn Lee
parent f26a468536
commit e754b431c7
  1. 4
      app/build.gradle
  2. 26
      app/src/main/java/com/alphawallet/app/ui/WalletConnectSessionActivity.java

@ -85,8 +85,8 @@ android {
} }
} }
defaultConfig { defaultConfig {
versionCode 205 versionCode 218
versionName "3.61" versionName "3.60.3"
applicationId "io.stormbird.wallet" applicationId "io.stormbird.wallet"
minSdkVersion 24 minSdkVersion 24

@ -55,7 +55,7 @@ import timber.log.Timber;
public class WalletConnectSessionActivity extends BaseActivity public class WalletConnectSessionActivity extends BaseActivity
{ {
private final Handler handler = new Handler(Looper.getMainLooper()); private final Handler handler = new Handler(Looper.getMainLooper());
private final LocalBroadcastManager broadcastManager; private LocalBroadcastManager broadcastManager;
WalletConnectViewModel viewModel; WalletConnectViewModel viewModel;
private RecyclerView recyclerView; private RecyclerView recyclerView;
private Button btnConnectWallet; private Button btnConnectWallet;
@ -78,11 +78,6 @@ public class WalletConnectSessionActivity extends BaseActivity
@Inject @Inject
AWWalletConnectClient awWalletConnectClient; AWWalletConnectClient awWalletConnectClient;
public WalletConnectSessionActivity()
{
broadcastManager = LocalBroadcastManager.getInstance(getApplicationContext());
}
@Override @Override
protected void onCreate(@Nullable Bundle savedInstanceState) protected void onCreate(@Nullable Bundle savedInstanceState)
{ {
@ -108,6 +103,11 @@ public class WalletConnectSessionActivity extends BaseActivity
.get(WalletConnectViewModel.class); .get(WalletConnectViewModel.class);
viewModel.serviceReady().observe(this, this::onServiceReady); viewModel.serviceReady().observe(this, this::onServiceReady);
} }
if (broadcastManager == null)
{
broadcastManager = LocalBroadcastManager.getInstance(getApplicationContext());
}
} }
private void onServiceReady(Boolean aBoolean) private void onServiceReady(Boolean aBoolean)
@ -123,13 +123,6 @@ public class WalletConnectSessionActivity extends BaseActivity
} }
} }
@Override
public void onPause()
{
super.onPause();
stopConnectionCheck();
}
private void setupList() private void setupList()
{ {
wcSessions = viewModel.getSessions(); wcSessions = viewModel.getSessions();
@ -173,6 +166,13 @@ public class WalletConnectSessionActivity extends BaseActivity
viewModel.track(Analytics.Navigation.WALLET_CONNECT_SESSIONS); viewModel.track(Analytics.Navigation.WALLET_CONNECT_SESSIONS);
} }
@Override
public void onPause()
{
super.onPause();
stopConnectionCheck();
}
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) public boolean onCreateOptionsMenu(Menu menu)
{ {

Loading…
Cancel
Save