Skip to content

Commit 372e047

Browse files
committed
#3468 Switch from RvRenderer to AdapterDelegates - resolve id conflict
1 parent c28fd8e commit 372e047

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

app/src/main/java/fr/free/nrw/commons/nearby/PlaceAdapterDelegate.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ fun placeAdapterDelegate(
3737
}
3838
cameraButton.setOnClickListener { onCameraClicked(item) }
3939
galleryButton.setOnClickListener { onGalleryClicked(item) }
40-
bookmarkRowButton.setOnClickListener {
40+
bookmarkButtonImage.setOnClickListener {
4141
val isBookmarked = bookmarkLocationDao.updateBookmarkLocation(item)
42-
bookmarkRowButtonImage.setImageResource(if (isBookmarked) R.drawable.ic_round_star_filled_24px else R.drawable.ic_round_star_border_24px)
42+
bookmarkButtonImage.setImageResource(if (isBookmarked) R.drawable.ic_round_star_filled_24px else R.drawable.ic_round_star_border_24px)
4343
onBookmarkClicked(item, isBookmarked)
4444
}
4545
iconOverflow.setOnClickListener { onOverflowIconClicked(item, it) }
@@ -59,7 +59,7 @@ fun placeAdapterDelegate(
5959
if (item.hasCommonsLink() || item.hasWikidataLink()) VISIBLE
6060
else GONE
6161

62-
bookmarkRowButtonImage.setImageResource(
62+
bookmarkButtonImage.setImageResource(
6363
if (bookmarkLocationDao.findBookmarkLocation(item))
6464
R.drawable.ic_round_star_filled_24px
6565
else

app/src/main/res/layout/nearby_row_button.xml

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<LinearLayout
2-
android:layout_width="match_parent"
3-
android:layout_height="wrap_content"
4-
android:id="@+id/buttonLayout"
5-
xmlns:app="http://schemas.android.com/apk/res-auto"
6-
android:orientation="horizontal"
7-
android:visibility="gone"
8-
android:layout_marginTop="@dimen/standard_gap"
9-
android:layout_below="@+id/icon"
10-
xmlns:android="http://schemas.android.com/apk/res/android"
11-
>
1+
<LinearLayout android:layout_width="match_parent"
2+
android:layout_height="wrap_content"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
android:id="@+id/buttonLayout"
5+
xmlns:app="http://schemas.android.com/apk/res-auto"
6+
android:orientation="horizontal"
7+
android:visibility="gone"
8+
tools:visibility="visible"
9+
android:layout_marginTop="@dimen/standard_gap"
10+
android:layout_below="@+id/icon"
11+
xmlns:android="http://schemas.android.com/apk/res/android">
1212

1313
<LinearLayout
1414
android:id="@+id/cameraButton"
@@ -123,4 +123,4 @@
123123

124124
</LinearLayout>
125125

126-
</LinearLayout>
126+
</LinearLayout>

0 commit comments

Comments
 (0)