Project

General

Profile

« Previous | Next » 

Revision c6e27c65

Added by Leszek Koltunski 8 months ago

If an object is re-stickered so that there are less colors on its faces than originally, block submitting records.

View differences:

src/main/java/org/distorted/playui/PlayLibInterface.java
37 37
import org.distorted.objectlib.helpers.BlockController;
38 38
import org.distorted.objectlib.helpers.ObjectLibInterface;
39 39
import org.distorted.objectlib.main.ObjectControl;
40
import org.distorted.objectlib.main.TwistyObject;
40 41
import org.distorted.objects.RubikObject;
41 42
import org.distorted.objects.RubikObjectList;
42 43
import org.distorted.main.BuildConfig;
......
303 304
      switch(mIsNewRecord)
304 305
        {
305 306
        case RECORD_FIRST  :
306
        case RECORD_NEW    : Bundle byes = createDialogBundle();
307
                             RubikDialogNewRecord dyes = new RubikDialogNewRecord();
308
                             dyes.setArguments(byes);
309
                             dyes.show( act.getSupportFragmentManager(), RubikDialogNewRecord.getDialogTag() );
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
                               }
310 325
                             break;
311 326
        case RECORD_NOT_NEW: Bundle bno = createDialogBundle();
312 327
                             RubikDialogSolved dno = new RubikDialogSolved();

Also available in: Unified diff