center sync status

This commit is contained in:
m2049r 2023-05-03 08:22:23 +02:00
parent 3406f585f2
commit a42f750fc4
No known key found for this signature in database
GPG Key ID: 4386E69AF260078D
3 changed files with 5 additions and 5 deletions

View File

@ -8,8 +8,8 @@ android {
applicationId "com.m2049r.xmrwallet"
minSdkVersion 21
targetSdkVersion 31
versionCode 3110
versionName "3.1.1 'Fluorine Fermi'"
versionCode 3120
versionName "3.1.2 'Fluorine Fermi'"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {

View File

@ -447,6 +447,7 @@ public class WalletFragment extends Fragment
String sync;
if (!activityCallback.hasBoundService())
throw new IllegalStateException("WalletService not bound.");
ivSynced.setVisibility(View.GONE);
Wallet.ConnectionStatus daemonConnected = activityCallback.getConnectionStatus();
if (daemonConnected == Wallet.ConnectionStatus.ConnectionStatus_Connected) {
if (!wallet.isSynchronized()) {
@ -460,7 +461,6 @@ public class WalletFragment extends Fragment
int x = 100 - Math.round(100f * n / (1f * daemonHeight - firstBlock));
if (x == 0) x = 101; // indeterminate
setProgress(x);
ivSynced.setVisibility(View.INVISIBLE);
} else {
sync = getString(R.string.status_synced) + " " + formatter.format(wallet.getBlockChainHeight());
ivSynced.setVisibility(View.VISIBLE);

View File

@ -26,7 +26,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="24dp"
android:gravity="center"
android:orientation="horizontal">
@ -36,7 +36,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:src="@drawable/ic_done_all"
android:visibility="invisible" />
android:visibility="gone" />
<TextView
android:id="@+id/tvProgress"