Project

General

Profile

« Previous | Next » 

Revision 5a2a7682

Added by Leszek Koltunski about 1 year ago

bugfix

View differences:

src/main/java/org/distorted/main/MainActivity.java
429 429

  
430 430
    public void switchToPlay(RubikObject object, int ordinal, int scrambles, int level)
431 431
      {
432
      boolean local = object.isLocal();
433
      String name = local ? object.getLowerName() : object.getUpperName();
434

  
432 435
      Intent intent = new Intent(this, PlayActivity.class);
433 436
      intent.putExtra("level", level);
434
      intent.putExtra("name", object.getUpperName());
437
      intent.putExtra("name", name );
435 438
      intent.putExtra("scrambles", scrambles);
436
      intent.putExtra("local", object.isLocal() );
439
      intent.putExtra("local", local );
437 440
      intent.putExtra("ordinal", ordinal );
438 441
      startActivity(intent);
439 442
      }
src/main/java/org/distorted/playui/PlayActivity.java
323 323

  
324 324
///////////////////////////////////////////////////////////////////////////////////////////////////
325 325

  
326
    private void changeIfDifferent(String upperName, boolean local, int ordinal, ObjectControl control)
326
    private void changeIfDifferent(String name, boolean local, int ordinal, ObjectControl control)
327 327
      {
328 328
      if( local )
329 329
        {
330 330
        RubikFiles files = RubikFiles.getInstance();
331 331
        int iconMode = TwistyObject.MODE_NORM;
332
        InputStream jsonStream = files.openFile(this, upperName+"_object.json");
332
        InputStream jsonStream = files.openFile(this, name+"_object.json");
333 333
        InitAssets asset = new InitAssets(jsonStream, null, null);
334
        control.changeIfDifferent(ordinal,upperName,iconMode,asset);
334
        control.changeIfDifferent(ordinal,name,iconMode,asset);
335 335
        }
336 336
      else
337 337
        {
......
342 342
        PlayView view = findViewById(R.id.playView);
343 343
        OSInterface os = view.getInterface();
344 344
        InitAssets asset = new InitAssets(jsonStream, meshStream, os);
345
        control.changeIfDifferent(ordinal, upperName, iconMode, asset);
345
        control.changeIfDifferent(ordinal, name, iconMode, asset);
346 346
        }
347 347
      }
348 348

  

Also available in: Unified diff