Project

General

Profile

« Previous | Next » 

Revision ff377568

Added by Leszek Koltunski 9 months ago

If an object is re-stickered so that there are less colors on its faces than originally - also do not remember those records locally at all.

View differences:

src/main/java/org/distorted/external/RubikScores.java
300 300

  
301 301
    long oldRecord = oldValue.record;
302 302

  
303
    if( oldRecord>record)
303
    if( oldRecord>record )
304 304
      {
305 305
      MapValue value = new MapValue(record,0);
306 306
      mMap.put(key,value);
src/main/java/org/distorted/playui/PlayLibInterface.java
276 276
    if( ScreenList.getCurrentScreen()==ScreenList.SOLV )
277 277
      {
278 278
      PlayActivity act = mAct.get();
279
      ObjectControl control = act.getControl();
280
      TwistyObject obj = control.getObject();
281
      boolean submittable = obj.isSubmittable();
279 282
      int objectOrdinal = act.getObjectOrdinal();
280 283
      ScreenSolving solving = (ScreenSolving)ScreenList.SOLV.getScreenClass();
281 284
      mNewRecord = solving.stopTimerAndGetRecord();
282
      mIsNewRecord = solving.setRecord(objectOrdinal);
285
      mIsNewRecord = submittable ? solving.setRecord(objectOrdinal) : RECORD_NOT_NEW;
283 286
      }
284 287
    }
285 288

  
......
290 293
    if( ScreenList.getCurrentScreen()==ScreenList.SOLV )
291 294
      {
292 295
      PlayActivity act = mAct.get();
293
      reportRecord(act,startTime,endTime,debug,scrambleNum);
296
      ObjectControl control = act.getControl();
297
      TwistyObject obj = control.getObject();
298
      boolean submittable = obj.isSubmittable();
299

  
300
      if( submittable ) reportRecord(act,startTime,endTime,debug,scrambleNum);
294 301

  
295 302
      RubikScores scores = RubikScores.getInstance();
296 303
      int numWins = scores.incrementNumWins();
......
304 311
      switch(mIsNewRecord)
305 312
        {
306 313
        case RECORD_FIRST  :
307
        case RECORD_NEW    : ObjectControl control = act.getControl();
308
                             TwistyObject obj = control.getObject();
309
                             boolean submittable = obj.isSubmittable();
310

  
311
                             Bundle byes = createDialogBundle();
312

  
313
                             if( submittable )
314
                               {
315
                               RubikDialogNewRecord dyes = new RubikDialogNewRecord();
316
                               dyes.setArguments(byes);
317
                               dyes.show( act.getSupportFragmentManager(), RubikDialogNewRecord.getDialogTag() );
318
                               }
319
                             else
320
                               {
321
                               RubikDialogSolved dno = new RubikDialogSolved();
322
                               dno.setArguments(byes);
323
                               dno.show( act.getSupportFragmentManager(), RubikDialogSolved.getDialogTag() );
324
                               }
314
        case RECORD_NEW    : Bundle byes = createDialogBundle();
315
                             RubikDialogNewRecord dyes = new RubikDialogNewRecord();
316
                             dyes.setArguments(byes);
317
                             dyes.show( act.getSupportFragmentManager(), RubikDialogNewRecord.getDialogTag() );
325 318
                             break;
326 319
        case RECORD_NOT_NEW: Bundle bno = createDialogBundle();
327 320
                             RubikDialogSolved dno = new RubikDialogSolved();

Also available in: Unified diff