Revision 526a5906
Added by Leszek Koltunski almost 3 years ago
src/main/java/org/distorted/main/RubikActivity.java | ||
---|---|---|
331 | 331 |
mPolicyAccepted = preferences.getBoolean("policyAccepted", false); |
332 | 332 |
String oldVersion = preferences.getString("appVersion",""); |
333 | 333 |
|
334 |
RubikObjectList.restorePreferences(preferences); |
|
335 |
|
|
334 | 336 |
for (int i=0; i< BaseEffect.Type.LENGTH; i++) |
335 | 337 |
{ |
336 | 338 |
BaseEffect.Type.getType(i).restorePreferences(preferences); |
... | ... | |
341 | 343 |
ScreenList.getScreen(i).getScreenClass().restorePreferences(preferences); |
342 | 344 |
} |
343 | 345 |
|
344 |
RubikObjectList.restorePreferences(preferences); |
|
345 | 346 |
ScreenList.restorePreferences(preferences); |
346 |
|
|
347 | 347 |
RubikSurfaceView view = findViewById(R.id.rubikSurfaceView); |
348 | 348 |
|
349 | 349 |
// Versions <= 1.8.6 did not save their 'appVersion' to preferences, therefore in their |
src/main/java/org/distorted/objects/RubikObjectList.java | ||
---|---|---|
283 | 283 |
|
284 | 284 |
public static void restorePreferences(SharedPreferences preferences) |
285 | 285 |
{ |
286 |
if( mThis==null ) mThis = new RubikObjectList(); |
|
287 |
|
|
286 | 288 |
String downloaded = preferences.getString("rol_downloaded",""); |
287 | 289 |
|
288 | 290 |
if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", downloaded); |
Also available in: Unified diff
Restore the list of objects before resotoring the list of records; otherwise we cannot restore records of downloaded objects.