mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 21:33:53 +01:00
Review category issues (#4897)
* Ask for category only if exists in Peer Review * Minor Fixes * Fixed wrong categories issue * Added comments * Added comments * Minor Changes * Added test * Tests * Tests * Tests
This commit is contained in:
parent
7bc78f67ff
commit
103e2d546e
9 changed files with 171 additions and 13 deletions
|
|
@ -14,7 +14,7 @@ import fr.free.nrw.commons.upload.depicts.DepictsDao
|
|||
* The database for accessing the respective DAOs
|
||||
*
|
||||
*/
|
||||
@Database(entities = [Contribution::class, Depicts::class, UploadedStatus::class], version = 10, exportSchema = false)
|
||||
@Database(entities = [Contribution::class, Depicts::class, UploadedStatus::class], version = 11, exportSchema = false)
|
||||
@TypeConverters(Converters::class)
|
||||
abstract class AppDatabase : RoomDatabase() {
|
||||
abstract fun contributionDao(): ContributionDao
|
||||
|
|
|
|||
|
|
@ -79,11 +79,21 @@ public class Converters {
|
|||
return writeObjectToString(objectList);
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
public static String mapObjectToString2(Map<String,Boolean> objectList) {
|
||||
return writeObjectToString(objectList);
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
public static Map<String,String> stringToMap(String objectList) {
|
||||
return readObjectWithTypeToken(objectList, new TypeToken<Map<String,String>>(){});
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
public static Map<String,Boolean> stringToMap2(String objectList) {
|
||||
return readObjectWithTypeToken(objectList, new TypeToken<Map<String,Boolean>>(){});
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
public static String latlngObjectToString(LatLng latlng) {
|
||||
return writeObjectToString(latlng);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue