From 7c73fab51c9820fc45569d63b17b19caa7e7e306 Mon Sep 17 00:00:00 2001 From: MIPPL Date: Thu, 20 Aug 2020 17:41:08 +0200 Subject: [PATCH] disable support for RTL layouts remove duplicate mappings in sports list --- .idea/caches/build_file_checksums.ser | Bin 544 -> 544 bytes app/build.gradle | 4 ++-- app/src/main/AndroidManifest.xml | 2 +- .../tools/sqlite/BetMappingTxDataStore.java | 12 +++++++++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index 03c14274c075fc8a29261bd3e39720b430c90e86..f2b415c28ccee73bc080882e4d6e565d24cab0a3 100644 GIT binary patch delta 36 scmZ3$vVdj6bk-7{mQ??VbIJv3g?+=9a4eeprB{%RJ$CEo$;ym>0s9aRSO5S3 delta 36 ucmV+<0Nekd1fT?vmj!d;NhJG`oOckz6Dn;4n)Pr7IBkf4 getAllSports(Context app, String iso, long eventTi + " AND " + BRSQLiteHelper.BMTX_MAPPINGID + " IN " + "( SELECT DISTINCT "+ BRSQLiteHelper.BETX_SPORT + " FROM " + BRSQLiteHelper.BETX_TABLE_NAME; - QUERY += " WHERE " + BRSQLiteHelper.BETX_EVENT_TIMESTAMP+"> " + String.valueOf(eventTimestamp) + " ) "; QUERY += " ORDER BY " + BRSQLiteHelper.BMTX_STRING; cursor = database.rawQuery(QUERY, null); cursor.moveToFirst(); + HashMap map = new HashMap(); while (!cursor.isAfterLast()) { - BetMappingEntity transactionEntity = cursorToTransaction(app, iso.toUpperCase(), cursor); - transactions.add(transactionEntity); + String hash = cursor.getString(0); + String mappingId = String.valueOf(cursor.getLong(4)); + if ( !map.containsKey(mappingId) ) { // avoid duplicate mapping (same id) with different hash + BetMappingEntity transactionEntity = cursorToTransaction(app, iso.toUpperCase(), cursor); + transactions.add(transactionEntity); + map.put(mappingId, hash); + } cursor.moveToNext(); } } catch (Exception ex) {