Skip to content

Commit

Permalink
disable support for RTL layouts
Browse files Browse the repository at this point in the history
remove duplicate mappings in sports list
  • Loading branch information
MIPPL committed Aug 20, 2020
1 parent fb927e1 commit 7c73fab
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
Binary file modified .idea/caches/build_file_checksums.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 280
versionName "280"
versionCode 281
versionName "281"
multiDexEnabled true

// Similar to other properties in the defaultConfig block,
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
android:label="@string/app_name"
android:largeHeap="true"
android:launchMode="singleTask"
android:supportsRtl="true"
android:supportsRtl="false"
android:theme="@style/AppTheme"
android:windowSoftInputMode="stateVisible|adjustResize">
<activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import com.wagerrwallet.wallet.wallets.util.CryptoUriParser;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class BetMappingTxDataStore implements BRDataSourceInterface {
Expand Down Expand Up @@ -189,16 +190,21 @@ public List<BetMappingEntity> 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<String, String> map = new HashMap<String, String>();
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) {
Expand Down

0 comments on commit 7c73fab

Please sign in to comment.