Revision 286d73ae
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/dialog/RubikDialogScoresView.java | ||
---|---|---|
81 | 81 |
RubikScores scores = RubikScores.getInstance(); |
82 | 82 |
|
83 | 83 |
boolean inserted = false; |
84 |
long myRecordInSeconds = scores.getRecord(object, size, scramble); |
|
84 |
long myRecordInMillis = scores.getRecord(object, size, scramble); |
|
85 |
float myRecordInSeconds = (myRecordInMillis/100)/10.0f; |
|
86 |
boolean mySubmitted = scores.isSubmitted(object, size, scramble); |
|
85 | 87 |
String myName = scores.getName(); |
86 | 88 |
int myCountryID = scores.getCountryID(); |
87 |
String myRecord = ( myRecordInSeconds<RubikScores.NO_RECORD ) ? Float.toString((myRecordInSeconds/100)/10.0f) : "??";
|
|
89 |
String myRecord = ( myRecordInMillis<RubikScores.NO_RECORD ) ? Float.toString(myRecordInSeconds) : "??";
|
|
88 | 90 |
String theirTime; |
89 | 91 |
int theirCountryID; |
90 | 92 |
|
... | ... | |
95 | 97 |
{ |
96 | 98 |
if( name[j] != null ) |
97 | 99 |
{ |
98 |
if( myRecordInSeconds<time[j] && !inserted ) |
|
100 |
if( !mySubmitted && myRecordInSeconds<time[j] && !inserted )
|
|
99 | 101 |
{ |
100 | 102 |
inserted = true; |
101 | 103 |
View row = createRow(act, myCountryID, myName, myRecord, red); |
... | ... | |
128 | 130 |
TextView textName = row.findViewById(R.id.scoresScrambleRowName); |
129 | 131 |
TextView textTime = row.findViewById(R.id.scoresScrambleRowTime); |
130 | 132 |
|
131 |
imgCoun.setImageResource(countryID!=0 ? countryID : R.drawable.unk);
|
|
133 |
imgCoun.setImageResource(countryID!=0 ? countryID : R.drawable.un); |
|
132 | 134 |
textName.setText(name); |
133 | 135 |
textTime.setText(time); |
134 | 136 |
|
Also available in: Unified diff
Port the downloading into the new 'magic' server.