Project

General

Profile

« Previous | Next » 

Revision 88913ad4

Added by Leszek Koltunski 9 months ago

Fix an important bug noticed by Anna Vivaldi

View differences:

src/main/java/org/distorted/dialogs/RubikDialogScores.java
85 85
    int numObjects = RubikObjectList.getNumObjects();
86 86
    ViewGroup.LayoutParams paramsView = new ViewGroup.LayoutParams( tabWidth,tabHeight );
87 87

  
88
    for (int object=0; object<numObjects; object++)
88
    for( int object=0; object<numObjects; object++ )
89 89
      {
90 90
      RubikObject robject = RubikObjectList.getObject(object);
91 91
      ImageView imageView = new ImageView(act);
92 92
      if( robject!=null ) robject.setIconTo(act,imageView);
93 93
      imageView.setLayoutParams(paramsView);
94 94
      TabLayout.Tab tab = tabLayout.getTabAt(object);
95
      if(tab!=null) tab.setCustomView(imageView);
95
      if( tab!=null ) tab.setCustomView(imageView);
96 96
      }
97 97
    }
98 98
  }
src/main/java/org/distorted/main/MainActivity.java
310 310

  
311 311
      RubikObjectList.savePreferences(editor);
312 312

  
313
      RubikScores scores = RubikScores.getInstance();
314
      scores.savePreferences(editor);
315

  
316 313
      boolean success = editor.commit();
317 314
      if( !success ) android.util.Log.e("D", "Failed to save preferences");
318 315
      }
src/main/java/org/distorted/playui/PlayActivity.java
27 27
import com.google.firebase.analytics.FirebaseAnalytics;
28 28

  
29 29
import org.distorted.dialogs.RubikDialogScores;
30
import org.distorted.external.RubikScores;
30 31
import org.distorted.library.main.DistortedLibrary;
31 32
import org.distorted.objectlib.main.InitAssets;
32 33
import org.distorted.objectlib.main.ObjectControl;
......
285 286
    os.setEditor(editor);
286 287
    view.getObjectControl().savePreferences();
287 288

  
289
    RubikScores scores = RubikScores.getInstance();
290
    scores.savePreferences(editor);
291

  
288 292
    editor.apply();
289 293
    }
290 294

  

Also available in: Unified diff