mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Add bookmarks to Nearby map (#3728)
* Remove bookmark button from row button set and put to upper level list item * Fix npe caused by lookinf for parent fragment, we don't have one anymore * style * Add new icons for bookmarked places * Change bookmarked info when bookmarked * Add pic field to bookmark dao so that we can retrieve them later * Put bookmarks as the first item of list * Add bookmark as a label * Add logic to filter nearby * remove unneeded changes * fix word * Remove logs * Remove unused part of code * Fix tests * Remove logs * simplify icon picking * remove redundant margin left * Remove non needed map and swap * Add main thread annotation * Fix tests
This commit is contained in:
parent
384afa6c44
commit
3f31c3eded
13 changed files with 161 additions and 90 deletions
|
|
@ -35,7 +35,8 @@ class BookMarkLocationDaoTest {
|
|||
COLUMN_WIKIDATA_LINK,
|
||||
COLUMN_COMMONS_LINK,
|
||||
COLUMN_LAT,
|
||||
COLUMN_LONG)
|
||||
COLUMN_LONG,
|
||||
COLUMN_PIC)
|
||||
private val client: ContentProviderClient = mock()
|
||||
private val database: SQLiteDatabase = mock()
|
||||
private val captor = argumentCaptor<ContentValues>()
|
||||
|
|
@ -93,6 +94,7 @@ class BookMarkLocationDaoTest {
|
|||
assertEquals(builder.build().wikipediaLink, it.siteLinks.wikipediaLink)
|
||||
assertEquals(builder.build().wikidataLink, it.siteLinks.wikidataLink)
|
||||
assertEquals(builder.build().commonsLink, it.siteLinks.commonsLink)
|
||||
assertEquals("picName",it.pic)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -256,7 +258,7 @@ class BookMarkLocationDaoTest {
|
|||
for (i in 0 until rowCount) {
|
||||
addRow(listOf("placeName", "placeDescription","placeCategory", exampleLabel.text, exampleLabel.icon,
|
||||
exampleUri, builder.build().wikipediaLink, builder.build().wikidataLink, builder.build().commonsLink,
|
||||
exampleLocation.latitude, exampleLocation.longitude))
|
||||
exampleLocation.latitude, exampleLocation.longitude, "picName"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue