Skip to content

Commit

Permalink
revert balance listener, add back button to bet settings, b 249
Browse files Browse the repository at this point in the history
  • Loading branch information
MIPPL committed Nov 8, 2019
1 parent 26c5a3b commit 96fab49
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 30 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
Binary file modified .idea/caches/gradle_models.ser
Binary file not shown.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId = 'com.wagerrwallet'
minSdkVersion 23
targetSdkVersion 28
versionCode 248
versionName "248"
versionCode 249
versionName "249"
multiDexEnabled true

// Similar to other properties in the defaultConfig block,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,6 @@ public void onClick(View v) {
BRDialog.showSimpleDialog(this, getString(R.string.Dialog_screenAlteringTitle), getString(R.string.Dialog_screenAlteringMessage));
}

WalletsMaster.getInstance(this).getCurrentWallet(this).addBalanceChangedListener(new OnBalanceChangedListener() {
@Override
public void onBalanceChanged(String iso, long newBalance) {
updateBalance();
}
});
}

public boolean isSearchActive() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class BetSettings extends BRActivity {

private AppCompatCheckBox chkDisplayOdds;
private static BetSettings app;

private ImageButton mBackButton;

public static BetSettings getApp() {
return app;
Expand All @@ -65,6 +65,16 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
BRSharedPrefs.putFeatureEnabled(app, isChecked, FEATURE_DISPLAY_ODDS);
}
});

mBackButton = findViewById(R.id.back_button);

mBackButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
onBackPressed();
}
});

}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void run() {
Thread.sleep(DELAY_MILLIS);
}
} catch (InterruptedException e) {
Log.e(TAG, "run: " + getName(), e);
//Log.e(TAG, "run: " + getName(), e);
final double syncProgress = mCurrentWallet.getPeerManager().getSyncProgress(BRSharedPrefs.getStartHeight(mApp, mCurrentWallet.getIso(mApp)));
BRExecutor.getInstance().forMainThreadTasks().execute(new Runnable() {
@Override
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/com/wagerrwallet/tools/util/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,19 @@ public static byte[] hexToBytes(String s) {
}

public static boolean isFingerprintEnrolled(Context app) {
//return true;
FingerprintManager fingerprintManager = (FingerprintManager) app.getSystemService(FINGERPRINT_SERVICE);
if (fingerprintManager==null) { // Device doesn't support fingerprint authentication
return false;
}
else {
return ActivityCompat.checkSelfPermission(app, Manifest.permission.USE_FINGERPRINT) == PackageManager.PERMISSION_GRANTED && fingerprintManager.isHardwareDetected() && fingerprintManager.hasEnrolledFingerprints();
}

}

public static boolean isFingerprintAvailable(Context app) {
//return true;
FingerprintManager fingerprintManager = (FingerprintManager) app.getSystemService(FINGERPRINT_SERVICE);
if (fingerprintManager == null) return false;
// Device doesn't support fingerprint authentication
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/jni/breadwallet-core
Submodule breadwallet-core updated 1 files
+1 −1 BRWallet.c
55 changes: 40 additions & 15 deletions app/src/main/res/layout/activity_betsettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,44 @@
android:background="@color/extra_light_blue_background"
tools:context="com.wagerrwallet.presenter.activities.SetPinActivity">

<com.wagerrwallet.presenter.customviews.BRText
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/bread_margin"
android:layout_marginTop="32dp"
android:lineSpacingMultiplier="1.3"
android:text="Wagerr Bet Display Settings"
android:textColor="@color/almost_black"
android:textSize="@dimen/header"
app:customTFont="CircularPro-Bold.otf"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
app:layout_constraintTop_toTopOf="parent"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_height="wrap_content">

<ImageButton
android:id="@+id/back_button"
android:background="@drawable/ic_chevron_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
app:layout_constraintRight_toLeftOf="@id/title"
app:layout_constraintTop_toTopOf="parent"
/>

<com.wagerrwallet.presenter.customviews.BRText
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/bread_margin"
android:layout_marginTop="32dp"
android:lineSpacingMultiplier="1.3"
android:text="Wagerr Bet Display Settings"
android:textColor="@color/almost_black"
android:textSize="@dimen/header"
app:customTFont="CircularPro-Bold.otf"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</LinearLayout>

</android.support.v7.widget.Toolbar>

<android.support.v7.widget.AppCompatCheckBox
android:id="@+id/chk_displayodds"
Expand All @@ -36,8 +61,8 @@
android:textColor="@color/light_gray"
android:textSize="@dimen/sub_header"
app:customTFont="CircularPro-Bold.otf"
app:layout_constraintLeft_toLeftOf="@+id/title"
app:layout_constraintTop_toBottomOf="@+id/title" />
app:layout_constraintLeft_toLeftOf="@+id/toolbar"
app:layout_constraintTop_toBottomOf="@+id/toolbar" />



Expand Down
4 changes: 0 additions & 4 deletions app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content" />



</LinearLayout>



</android.support.v7.widget.Toolbar>

<com.wagerrwallet.presenter.customviews.BRText
Expand Down

0 comments on commit 96fab49

Please sign in to comment.