Project

General

Profile

« Previous | Next » 

Revision ff4a2a13

Added by Leszek Koltunski 4 months ago

progress with new sorting methods.

View differences:

src/main/java/org/distorted/dialogs/RubikDialogUpdateView.java
197 197
          File file = new File(act.getFilesDir(), objectName);
198 198
          InputStream stream = new FileInputStream(file);
199 199
          JsonReader reader = new JsonReader();
200
          reader.readNumScramblesAndPrice(stream);
200
          reader.parseJsonFileMetadata(stream);
201 201
          stream.close();
202 202

  
203 203
          mInfo.mNumScrambles = reader.getNumScrambles();
204 204
          mInfo.mPrice        = reader.getPrice();
205
          float diff          = reader.getDifficulty();
206
          int category        = reader.getCategory();
207
          int year            = reader.getYearOfInvention();
208
          String author       = reader.getAuthor();
209

  
205 210
          if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "Read from JSON numScrambles="+mInfo.mNumScrambles+" price="+mInfo.mPrice);
206 211

  
207 212
          if( mInfo.mExtrasStream!=null )
......
218 223

  
219 224
            if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "1");
220 225

  
221
            boolean success = RubikObjectList.addDownloadedObject(act, mInfo.mObjectShortName, mInfo.mNumScrambles, mInfo.mPrice,
222
                                                                  mInfo.mObjectMinorVersion, mInfo.mExtrasMinorVersion, mIconSaved, oSuccess, eSuccess);
226
            boolean success = RubikObjectList.addDownloadedObject(act, mInfo.mObjectShortName, mInfo.mNumScrambles, mInfo.mPrice, mInfo.mObjectMinorVersion,
227
                                                                  mInfo.mExtrasMinorVersion, mIconSaved, oSuccess, eSuccess, diff, category, year, author);
223 228
            if( success )
224 229
              {
225 230
              if( SHOW_DOWNLOADED_DEBUG ) android.util.Log.e("D", "2");

Also available in: Unified diff