mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2025-12-26 16:47:57 -05:00
Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bf6f6cd5f | ||
|
|
1872bea0c3 | ||
|
|
665ef5f712 | ||
|
|
9fbcb23465 | ||
|
|
25c35acd6d | ||
|
|
35747b7d9f | ||
|
|
eea5cdfdd0 | ||
|
|
e0c28830ab | ||
|
|
e714d98ae6 | ||
|
|
bbfba92de0 | ||
|
|
efda8f9f10 | ||
|
|
041472b44b | ||
|
|
92f79e9d3e | ||
|
|
f932d8f6e4 | ||
|
|
5e3399cd32 | ||
|
|
b736f31dc2 | ||
|
|
ff285430c0 | ||
|
|
504c1ac516 | ||
|
|
c4746fe2b9 | ||
|
|
99383d4fc6 | ||
|
|
71cd16caac | ||
|
|
6a04077cec | ||
|
|
5664ff5631 | ||
|
|
48764e266e | ||
|
|
435cfd2839 | ||
|
|
34639f2a2e | ||
|
|
ce9c3bffe6 | ||
|
|
d0d15393f6 | ||
|
|
e9eaf51e40 | ||
|
|
de8a843414 | ||
|
|
0ad4c683b7 | ||
|
|
fdbff0f942 | ||
|
|
a02d9fd995 | ||
|
|
f98203fc5d |
@@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## v2.16.3 - 107 (2022-04-15)
|
||||
|
||||
- Stocard import fixes
|
||||
|
||||
## v2.16.2 - 106 (2022-03-31)
|
||||
|
||||
- Fix some character sequences being shown as a single character
|
||||
|
||||
## v2.16.1 - 105 (2022-03-25)
|
||||
|
||||
- Fix gray block appearing on invalid value for barcode
|
||||
|
||||
@@ -18,8 +18,8 @@ android {
|
||||
applicationId "me.hackerchick.catima"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 31
|
||||
versionCode 105
|
||||
versionName "2.16.1"
|
||||
versionCode 107
|
||||
versionName "2.16.3"
|
||||
|
||||
vectorDrawables.useSupportLibrary true
|
||||
multiDexEnabled true
|
||||
@@ -90,7 +90,7 @@ dependencies {
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
||||
|
||||
// Splash Screen
|
||||
implementation 'androidx.core:core-splashscreen:1.0.0-beta01'
|
||||
implementation 'androidx.core:core-splashscreen:1.0.0-beta02'
|
||||
|
||||
// Third-party
|
||||
implementation 'com.journeyapps:zxing-android-embedded:4.3.0@aar'
|
||||
|
||||
@@ -73,9 +73,10 @@ class LetterBitmap {
|
||||
String firstChar = displayName.substring(0, 1).toUpperCase();
|
||||
int firstCharEnd = 2;
|
||||
while (firstCharEnd <= displayName.length()) {
|
||||
// test for the longest render-able string
|
||||
// Test for the longest render-able string
|
||||
// But ignore containing only a-Z0-9 to not render things like ffi as a single character
|
||||
String test = displayName.substring(0, firstCharEnd);
|
||||
if (PaintCompat.hasGlyph(paint, test)) {
|
||||
if (!isAlphabetical(test) && PaintCompat.hasGlyph(paint, test)) {
|
||||
firstChar = test;
|
||||
}
|
||||
firstCharEnd++;
|
||||
@@ -124,6 +125,10 @@ class LetterBitmap {
|
||||
return colors.getColor(color, Color.BLACK);
|
||||
}
|
||||
|
||||
private static boolean isAlphabetical(String string) {
|
||||
return string.matches("[a-zA-Z0-9]*");
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine the color which the letter tile will use if no default
|
||||
* color is provided.
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.text.ParseException;
|
||||
import protect.card_locker.CatimaBarcode;
|
||||
import protect.card_locker.DBHelper;
|
||||
import protect.card_locker.FormatException;
|
||||
import protect.card_locker.Utils;
|
||||
|
||||
/**
|
||||
* Class for importing a database from CSV (Comma Separate Values)
|
||||
@@ -56,7 +57,7 @@ public class FidmeImporter implements Importer {
|
||||
|
||||
try {
|
||||
for (CSVRecord record : fidmeParser) {
|
||||
importLoyaltyCard(database, record);
|
||||
importLoyaltyCard(context, database, record);
|
||||
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
throw new InterruptedException();
|
||||
@@ -75,7 +76,7 @@ public class FidmeImporter implements Importer {
|
||||
* Import a single loyalty card into the database using the given
|
||||
* session.
|
||||
*/
|
||||
private void importLoyaltyCard(SQLiteDatabase database, CSVRecord record)
|
||||
private void importLoyaltyCard(Context context, SQLiteDatabase database, CSVRecord record)
|
||||
throws FormatException {
|
||||
// A loyalty card export from Fidme contains the following fields:
|
||||
// Retailer (store name)
|
||||
@@ -117,11 +118,12 @@ public class FidmeImporter implements Importer {
|
||||
// TODO: Hook this into our own loyalty card DB if we ever get one
|
||||
CatimaBarcode barcodeType = null;
|
||||
|
||||
// No favourite data in the export either
|
||||
// No favourite data or colour in the export either
|
||||
int starStatus = 0;
|
||||
int headerColor = Utils.getRandomHeaderColor(context);
|
||||
|
||||
// TODO: Front and back image
|
||||
|
||||
DBHelper.insertLoyaltyCard(database, store, note, null, BigDecimal.valueOf(0), null, cardId, null, barcodeType, null, starStatus, null);
|
||||
DBHelper.insertLoyaltyCard(database, store, note, null, BigDecimal.valueOf(0), null, cardId, null, barcodeType, headerColor, starStatus, null);
|
||||
}
|
||||
}
|
||||
@@ -55,7 +55,7 @@ public class MultiFormatImporter {
|
||||
return new ImportExportResult(ImportExportResultType.Success);
|
||||
} catch (ZipException e) {
|
||||
return new ImportExportResult(ImportExportResultType.BadPassword);
|
||||
} catch (IOException | FormatException | InterruptedException | JSONException | ParseException | NullPointerException e) {
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to import data", e);
|
||||
error = e.toString();
|
||||
} finally {
|
||||
|
||||
@@ -3,6 +3,7 @@ package protect.card_locker.importexport;
|
||||
import android.content.Context;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.graphics.Bitmap;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
|
||||
@@ -39,6 +40,8 @@ import protect.card_locker.ZipUtils;
|
||||
* A header is expected for the each table showing the names of the columns.
|
||||
*/
|
||||
public class StocardImporter implements Importer {
|
||||
private static final String TAG = "Catima";
|
||||
|
||||
public void importData(Context context, SQLiteDatabase database, InputStream input, char[] password) throws IOException, FormatException, JSONException, ParseException {
|
||||
HashMap<String, HashMap<String, Object>> loyaltyCardHashMap = new HashMap<>();
|
||||
HashMap<String, HashMap<String, Object>> providers = new HashMap<>();
|
||||
@@ -201,6 +204,12 @@ public class StocardImporter implements Importer {
|
||||
|
||||
for (HashMap<String, Object> loyaltyCardData : loyaltyCardHashMap.values()) {
|
||||
String providerId = (String) loyaltyCardData.get("_providerId");
|
||||
|
||||
if (providerId == null) {
|
||||
Log.d(TAG, "Missing providerId for card " + loyaltyCardData + ", ignoring...");
|
||||
continue;
|
||||
}
|
||||
|
||||
HashMap<String, Object> providerData = providers.get(providerId);
|
||||
|
||||
String store = providerData != null ? providerData.get("name").toString() : providerId;
|
||||
@@ -211,6 +220,8 @@ public class StocardImporter implements Importer {
|
||||
if (barcodeTypeString != null && !barcodeTypeString.isEmpty()) {
|
||||
if (barcodeTypeString.equals("RSS_DATABAR_EXPANDED")) {
|
||||
barcodeType = CatimaBarcode.fromBarcode(BarcodeFormat.RSS_EXPANDED);
|
||||
} else if (barcodeTypeString.equals("GS1_128")) {
|
||||
barcodeType = CatimaBarcode.fromBarcode(BarcodeFormat.CODE_128);
|
||||
} else {
|
||||
barcodeType = CatimaBarcode.fromName(barcodeTypeString);
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ solokot
|
||||
Katharine Chui
|
||||
mondstern
|
||||
Oğuz Ersen
|
||||
IllusiveMan196
|
||||
Altonss
|
||||
Petr Novák
|
||||
IllusiveMan196
|
||||
StoyanDimitrov
|
||||
Petr Novák
|
||||
Joel A
|
||||
Taco
|
||||
Gediminas Murauskas
|
||||
@@ -23,12 +23,12 @@ Sergio Paredes
|
||||
huuhaa
|
||||
laralem
|
||||
arshbeerSingh
|
||||
Quentin PAGÈS
|
||||
Miha Frangež
|
||||
sr093906
|
||||
mdvhimself
|
||||
Maciej Błędkowski
|
||||
Olivia (Zoe)
|
||||
Quentin PAGÈS
|
||||
betsythefc
|
||||
Silvério Santos
|
||||
waffshappen
|
||||
@@ -83,10 +83,11 @@ Ronak Upadhyay
|
||||
Rose Liverman
|
||||
Simone Dotto
|
||||
Subhashish Anand
|
||||
darkodo
|
||||
Tymofii Lytvynenko
|
||||
Tjipke van der Heide
|
||||
Yevgeny M
|
||||
avikkundu
|
||||
Avik Kundu
|
||||
opsik
|
||||
psa-jforestier
|
||||
Robin
|
||||
|
||||
@@ -66,4 +66,6 @@
|
||||
<string name="groups">Grops</string>
|
||||
<string name="groupsList">Grops : <xliff:g>%s</xliff:g></string>
|
||||
<string name="settings_max_font_size_scale">Talha max. de la poliça</string>
|
||||
<string name="settings_theme_color">Color del tèma</string>
|
||||
<string name="settings_locale">Lenga</string>
|
||||
</resources>
|
||||
1
fastlane/metadata/android/bg/changelogs/99.txt
Normal file
1
fastlane/metadata/android/bg/changelogs/99.txt
Normal file
@@ -0,0 +1 @@
|
||||
- Нов дизайн с Material You
|
||||
@@ -1 +1 @@
|
||||
За щрихкодове, членства, програми за лоялност, талони и билети.
|
||||
За щрихкодове, карти за членства и лоялност, талони и билети.
|
||||
|
||||
@@ -1 +1 @@
|
||||
Catima
|
||||
Catima – портфейл за карти
|
||||
|
||||
2
fastlane/metadata/android/de-DE/changelogs/105.txt
Normal file
2
fastlane/metadata/android/de-DE/changelogs/105.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
- Grauer Block bei ungültigem Wert für Barcode behoben
|
||||
- Korrekturen beim Stocard-Import
|
||||
1
fastlane/metadata/android/en-US/changelogs/106.txt
Normal file
1
fastlane/metadata/android/en-US/changelogs/106.txt
Normal file
@@ -0,0 +1 @@
|
||||
- Fix some character sequences being shown as a single character
|
||||
1
fastlane/metadata/android/en-US/changelogs/107.txt
Normal file
1
fastlane/metadata/android/en-US/changelogs/107.txt
Normal file
@@ -0,0 +1 @@
|
||||
- Stocard import fixes
|
||||
2
fastlane/metadata/android/fr-FR/changelogs/102.txt
Normal file
2
fastlane/metadata/android/fr-FR/changelogs/102.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
- Plusieurs corrections mineures
|
||||
- Correction des plantages en langue norvégienne
|
||||
2
fastlane/metadata/android/fr-FR/changelogs/105.txt
Normal file
2
fastlane/metadata/android/fr-FR/changelogs/105.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
- Correction du bloc gris apparaissant sur une valeur invalide pour un code-barres
|
||||
- Corrections pour l'importation de Stocard
|
||||
@@ -1,4 +1,4 @@
|
||||
- Est désormais officiellement compatible avec ces codes-barres à une et deux dimensions :
|
||||
- Est désormais officiellement compatible avec les codes-barres à une et deux dimensions suivants :
|
||||
- AZTEC
|
||||
- CODABAR
|
||||
- CODE_39
|
||||
@@ -11,4 +11,4 @@
|
||||
- QR_CODE
|
||||
- UPC_A
|
||||
|
||||
- Les codes-barres sont maintenant affichés plus grand, afin d'en faciliter la lecture.
|
||||
- Les codes-barres sont maintenant affichés plus grand, afin d'en faciliter la lecture
|
||||
|
||||
@@ -1 +1 @@
|
||||
Catima — Kundklubbs plånboken
|
||||
Catima — Kundklubbsplånboken
|
||||
|
||||
1
fastlane/metadata/android/tr-TR/changelogs/106.txt
Normal file
1
fastlane/metadata/android/tr-TR/changelogs/106.txt
Normal file
@@ -0,0 +1 @@
|
||||
- Bazı karakter dizilerinin tek karakter olarak gösterilmesi düzeltildi
|
||||
Reference in New Issue
Block a user