File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
ui/src/main/java/io/snabble/sdk/ui/payment Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 11# Changelog
22All notable changes to this project will be documented in this file.
33
4+ ## [ 0.39.13]
5+
6+ ### Fixed
7+ - Fixed crash when using standalone PaymentCredentialsListView
8+
49## [ 0.39.12]
510
611### Added
Original file line number Diff line number Diff line change 2929import io .snabble .sdk .payment .PaymentCredentials ;
3030import io .snabble .sdk .payment .PaymentCredentialsStore ;
3131import io .snabble .sdk .ui .R ;
32+ import io .snabble .sdk .ui .SnabbleUI ;
3233import io .snabble .sdk .ui .telemetry .Telemetry ;
3334import io .snabble .sdk .ui .utils .KeyguardUtils ;
3435import io .snabble .sdk .ui .utils .OneShotClickListener ;
@@ -84,7 +85,13 @@ public void click() {
8485 if (activity instanceof FragmentActivity ) {
8586 SelectPaymentMethodFragment dialogFragment = new SelectPaymentMethodFragment ();
8687 Bundle bundle = new Bundle ();
87- bundle .putString (SelectPaymentMethodFragment .ARG_PROJECT_ID , project .getId ());
88+
89+ Project p = project ;
90+ if (p == null ) {
91+ p = SnabbleUI .getProject ();
92+ }
93+
94+ bundle .putString (SelectPaymentMethodFragment .ARG_PROJECT_ID , p .getId ());
8895 ArrayList <PaymentMethod > types ;
8996 if (PaymentCredentialsListView .this .types == null ) {
9097 types = new ArrayList <>(Arrays .asList (PaymentMethod .values ()));
You can’t perform that action at this time.
0 commit comments