From 38039fc76b27f0c1c279ceadb9a422924782feae Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Thu, 10 Jan 2019 14:23:10 -0600 Subject: [PATCH] Add the selected node information to the Crashlytics reports. --- .../bitsybitshareswallet/activities/ConnectedActivity.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/ConnectedActivity.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/ConnectedActivity.kt index c7f7c8e..c29f9c2 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/ConnectedActivity.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/ConnectedActivity.kt @@ -13,6 +13,7 @@ import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.lifecycle.Observer import androidx.lifecycle.ViewModelProviders +import com.crashlytics.android.Crashlytics import cy.agorise.bitsybitshareswallet.database.entities.Balance import cy.agorise.bitsybitshareswallet.processors.TransfersLoader import cy.agorise.bitsybitshareswallet.repositories.AssetRepository @@ -189,7 +190,11 @@ abstract class ConnectedActivity : AppCompatActivity(), ServiceConnection { ).show() } } else if (message is ConnectionStatusUpdate) { - if (message.updateCode == ConnectionStatusUpdate.DISCONNECTED) { + if (message.updateCode == ConnectionStatusUpdate.CONNECTED) { + // Make sure the Crashlytics report contains the currently selected node + val selectedNode = mNetworkService?.selectedNode + Crashlytics.log(selectedNode?.url) + } else if (message.updateCode == ConnectionStatusUpdate.DISCONNECTED) { // If we got a disconnection notification, we should clear our response map, since // all its stored request ids will now be reset responseMap.clear()