Skip to content

Commit

Permalink
center sync status
Browse files Browse the repository at this point in the history
  • Loading branch information
m2049r committed May 3, 2023
1 parent 3406f58 commit a42f750
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/m2049r/xmrwallet/WalletFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ private void updateStatus(Wallet wallet) {
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()) {
Expand All @@ -460,7 +461,6 @@ private void updateStatus(Wallet wallet) {
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);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_wallet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">

Expand All @@ -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"
Expand Down

0 comments on commit a42f750

Please sign in to comment.