mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 05:43:55 +01:00
* Integrate WLM - Show monuments in maps along with nearby * BugFix in Monuments 1. Single preference for monuments and campaigns 2. Expand collapse chips container in nearby 3. Typo fix in Monuments card in Nearby 4. If a nearby place is a monument as well - do not show them separately, show it as a monument instead 5. Bug fix, monument radius, use the same one as that of nearby * More bug fixes 1. Possible NPE in nearby 2. Added column location_address in BookmarkLocationDao 3. Bug Fix - Display Date in WLM card 4. WLM card on click takes to nearby * Use lowercase country code in WLM uploads * Bug-Fix, WLM Campaign Icon * 1. Updated monuments query to use any of the following properties for monuments - [P1435, P2186, P1459, P1460, P1216, P709, P718, P5694] 2. Append WikiData QID to descriptions template * Updated WLM Banner String, Handle NPE in contributions callback * Added nearby-monuments query log lines * Handle WLM Query exception : - if an exception is thrown in WLM query, continue showing the nearby items if that succeeds * Fix BookmarkLocationDaoTest * Added Column Address in BookmarkLocationDaoTest * Use fallback description as usual nearby pins even for WLM pins, instead of relying on P6375 * Test fix in BookmarkLocationDao * Updated template for WLM, removed redundant feilds * Fixed WLM template * Removed categories from WLM template * Fixed BookmarkControllerTest * Fixed BookmarkLocationFragmentUnitTest * fix ModelFunctions * Fixed BookmarksDaoLocationTest * Fixed WLM template
This commit is contained in:
parent
67f5b6c271
commit
6588a6fd0e
39 changed files with 2906 additions and 185 deletions
|
|
@ -147,25 +147,25 @@ public class BookmarkLocationsDao {
|
|||
}
|
||||
|
||||
@NonNull
|
||||
Place fromCursor(Cursor cursor) {
|
||||
LatLng location = new LatLng(cursor.getDouble(cursor.getColumnIndex(Table.COLUMN_LAT)),
|
||||
Place fromCursor(final Cursor cursor) {
|
||||
final LatLng location = new LatLng(cursor.getDouble(cursor.getColumnIndex(Table.COLUMN_LAT)),
|
||||
cursor.getDouble(cursor.getColumnIndex(Table.COLUMN_LONG)), 1F);
|
||||
|
||||
Sitelinks.Builder builder = new Sitelinks.Builder();
|
||||
final Sitelinks.Builder builder = new Sitelinks.Builder();
|
||||
builder.setWikipediaLink(cursor.getString(cursor.getColumnIndex(Table.COLUMN_WIKIPEDIA_LINK)));
|
||||
builder.setWikidataLink(cursor.getString(cursor.getColumnIndex(Table.COLUMN_WIKIDATA_LINK)));
|
||||
builder.setCommonsLink(cursor.getString(cursor.getColumnIndex(Table.COLUMN_COMMONS_LINK)));
|
||||
|
||||
return new Place(
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_LANGUAGE)),
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_NAME)),
|
||||
Label.fromText((cursor.getString(cursor.getColumnIndex(Table.COLUMN_LABEL_TEXT)))),
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_DESCRIPTION)),
|
||||
location,
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_CATEGORY)),
|
||||
builder.build(),
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_PIC)),
|
||||
Boolean.parseBoolean(cursor.getString(cursor.getColumnIndex(Table.COLUMN_EXISTS)))
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_LANGUAGE)),
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_NAME)),
|
||||
Label.fromText((cursor.getString(cursor.getColumnIndex(Table.COLUMN_LABEL_TEXT)))),
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_DESCRIPTION)),
|
||||
location,
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_CATEGORY)),
|
||||
builder.build(),
|
||||
cursor.getString(cursor.getColumnIndex(Table.COLUMN_PIC)),
|
||||
Boolean.parseBoolean(cursor.getString(cursor.getColumnIndex(Table.COLUMN_EXISTS)))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ public class BookmarkLocationsDao {
|
|||
COLUMN_WIKIDATA_LINK,
|
||||
COLUMN_COMMONS_LINK,
|
||||
COLUMN_PIC,
|
||||
COLUMN_EXISTS
|
||||
COLUMN_EXISTS,
|
||||
};
|
||||
|
||||
static final String DROP_TABLE_STATEMENT = "DROP TABLE IF EXISTS " + TABLE_NAME;
|
||||
|
|
@ -251,7 +251,7 @@ public class BookmarkLocationsDao {
|
|||
onCreate(db);
|
||||
}
|
||||
|
||||
public static void onUpdate(SQLiteDatabase db, int from, int to) {
|
||||
public static void onUpdate(final SQLiteDatabase db, int from, final int to) {
|
||||
Timber.d("bookmarksLocations db is updated from:"+from+", to:"+to);
|
||||
if (from == to) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue