mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2025-12-26 00:27:55 -05:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e452ed6bd | ||
|
|
a9e574a9b4 | ||
|
|
f24d11403c | ||
|
|
e1c658ac2a | ||
|
|
a5901700b4 | ||
|
|
bf4cd7a961 | ||
|
|
79ca5196d0 | ||
|
|
b24d641aa6 |
@@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## v2.15.2 - 103 (2022-02-11)
|
||||
|
||||
- Fix manual language selection not applying everywhere
|
||||
- Fix crash in edit view on regionless locale
|
||||
|
||||
## v2.15.1 - 102 (2022-02-10)
|
||||
|
||||
- Various minor fixes
|
||||
|
||||
@@ -18,8 +18,8 @@ android {
|
||||
applicationId "me.hackerchick.catima"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 31
|
||||
versionCode 102
|
||||
versionName "2.15.1"
|
||||
versionCode 103
|
||||
versionName "2.15.2"
|
||||
|
||||
vectorDrawables.useSupportLibrary true
|
||||
multiDexEnabled true
|
||||
|
||||
@@ -15,7 +15,7 @@ import protect.card_locker.preferences.Settings;
|
||||
|
||||
public class GroupCursorAdapter extends BaseCursorAdapter<GroupCursorAdapter.GroupListItemViewHolder> {
|
||||
Settings mSettings;
|
||||
private final Context mContext;
|
||||
public final Context mContext;
|
||||
private final GroupAdapterListener mListener;
|
||||
SQLiteDatabase mDatabase;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class GroupCursorAdapter extends BaseCursorAdapter<GroupCursorAdapter.Gro
|
||||
super(inputCursor, DBHelper.LoyaltyCardDbGroups.ORDER);
|
||||
setHasStableIds(true);
|
||||
mSettings = new Settings(inputContext);
|
||||
mContext = inputContext.getApplicationContext();
|
||||
mContext = inputContext;
|
||||
mListener = inputListener;
|
||||
mDatabase = new DBHelper(inputContext).getReadableDatabase();
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class LoyaltyCardCursorAdapter extends BaseCursorAdapter<LoyaltyCardCurso
|
||||
private int mCurrentSelectedIndex = -1;
|
||||
Settings mSettings;
|
||||
boolean mDarkModeEnabled;
|
||||
private final Context mContext;
|
||||
public final Context mContext;
|
||||
private final CardAdapterListener mListener;
|
||||
protected SparseBooleanArray mSelectedItems;
|
||||
protected SparseBooleanArray mAnimationItemsIndex;
|
||||
@@ -46,7 +46,7 @@ public class LoyaltyCardCursorAdapter extends BaseCursorAdapter<LoyaltyCardCurso
|
||||
super(inputCursor, DBHelper.LoyaltyCardDbIds.ID);
|
||||
setHasStableIds(true);
|
||||
mSettings = new Settings(inputContext);
|
||||
mContext = inputContext.getApplicationContext();
|
||||
mContext = inputContext;
|
||||
mListener = inputListener;
|
||||
mSelectedItems = new SparseBooleanArray();
|
||||
mAnimationItemsIndex = new SparseBooleanArray();
|
||||
|
||||
@@ -448,14 +448,10 @@ public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
|
||||
|
||||
for (int i = locales.size() - 1; i >= 0; i--) {
|
||||
Locale locale = locales.get(i);
|
||||
String currencySymbol = Currency.getInstance(locale).getSymbol();
|
||||
currencyList.remove(currencySymbol);
|
||||
currencyList.add(0, currencySymbol);
|
||||
currencyPrioritizeLocaleSymbols(currencyList, locale);
|
||||
}
|
||||
} else {
|
||||
String currencySymbol = Currency.getInstance(mSystemLocale).getSymbol();
|
||||
currencyList.remove(currencySymbol);
|
||||
currencyList.add(0, currencySymbol);
|
||||
currencyPrioritizeLocaleSymbols(currencyList, mSystemLocale);
|
||||
}
|
||||
|
||||
currencyList.add(0, getString(R.string.points));
|
||||
@@ -1513,4 +1509,14 @@ public class LoyaltyCardEditActivity extends CatimaAppCompatActivity {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
private void currencyPrioritizeLocaleSymbols(ArrayList<String> currencyList, Locale locale) {
|
||||
try {
|
||||
String currencySymbol = Currency.getInstance(locale).getSymbol();
|
||||
currencyList.remove(currencySymbol);
|
||||
currencyList.add(0, currencySymbol);
|
||||
} catch (IllegalArgumentException e) {
|
||||
Log.d(TAG, "Could not get currency data for locale info: " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,6 +313,24 @@ public class LoyaltyCardViewActivityTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(qualifiers="de")
|
||||
public void noCrashOnRegionlessLocale() {
|
||||
ActivityController activityController = Robolectric.buildActivity(LoyaltyCardEditActivity.class).create();
|
||||
|
||||
LoyaltyCardEditActivity activity = (LoyaltyCardEditActivity) activityController.get();
|
||||
final Context context = activity.getApplicationContext();
|
||||
|
||||
activityController.start();
|
||||
activityController.visible();
|
||||
activityController.resume();
|
||||
|
||||
shadowOf(getMainLooper()).idle();
|
||||
|
||||
// Check default settings
|
||||
checkAllFields(activity, ViewMode.ADD_CARD, "", "", context.getString(R.string.never), "0", context.getString(R.string.points), "", context.getString(R.string.sameAsCardId), context.getString(R.string.noBarcode), null, null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void noDataLossOnResumeOrRotate() {
|
||||
registerMediaStoreIntentHandler();
|
||||
|
||||
2
fastlane/metadata/android/en-US/changelogs/103.txt
Normal file
2
fastlane/metadata/android/en-US/changelogs/103.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
- Fix manual language selection not applying everywhere
|
||||
- Fix crash in edit view on regionless locale
|
||||
Reference in New Issue
Block a user