Skip to content

Commit 5ca3b78

Browse files
Remove Butterknife from Project (commons-app#5660)
1 parent 4c687b4 commit 5ca3b78

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

app/build.gradle

-2
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ dependencies {
4949
implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0'
5050
implementation 'com.dinuscxj:circleprogressbar:1.1.1'
5151
implementation 'com.karumi:dexter:5.0.0'
52-
implementation "com.jakewharton:butterknife:$BUTTERKNIFE_VERSION"
5352
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
5453

55-
kapt "com.jakewharton:butterknife-compiler:$BUTTERKNIFE_VERSION"
5654
implementation "com.hannesdorfmann:adapterdelegates4-kotlin-dsl-viewbinding:$ADAPTER_DELEGATES_VERSION"
5755
implementation "com.hannesdorfmann:adapterdelegates4-pagination:$ADAPTER_DELEGATES_VERSION"
5856
implementation "androidx.paging:paging-runtime-ktx:$PAGING_VERSION"

app/src/main/java/fr/free/nrw/commons/profile/leaderboard/UserDetailAdapter.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import android.widget.Toast;
1212
import androidx.annotation.NonNull;
1313
import androidx.recyclerview.widget.RecyclerView;
14-
import butterknife.internal.DebouncingOnClickListener;
1514
import com.facebook.drawee.view.SimpleDraweeView;
1615
import fr.free.nrw.commons.BuildConfig;
1716
import fr.free.nrw.commons.R;
@@ -108,9 +107,10 @@ public void onBindViewHolder(@NonNull UserDetailAdapter.DataViewHolder holder, i
108107
}
109108
if (currentlyLoggedInUserName != null && currentlyLoggedInUserName.equals(
110109
leaderboardResponse.getUsername())) {
111-
avatar.setOnClickListener(new DebouncingOnClickListener() {
110+
111+
avatar.setOnClickListener(new View.OnClickListener() {
112112
@Override
113-
public void doClick(View v) {
113+
public void onClick(View v) {
114114
Toast.makeText(v.getContext(),
115115
R.string.set_up_avatar_toast_string,
116116
Toast.LENGTH_LONG).show();

app/src/main/java/fr/free/nrw/commons/upload/UploadActivity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import androidx.viewpager.widget.PagerAdapter;
3030
import androidx.viewpager.widget.ViewPager;
3131
import androidx.work.ExistingWorkPolicy;
32-
import butterknife.OnClick;
3332
import fr.free.nrw.commons.CommonsApplication;
3433
import fr.free.nrw.commons.R;
3534
import fr.free.nrw.commons.auth.LoginActivity;
@@ -170,6 +169,7 @@ protected void onCreate(Bundle savedInstanceState) {
170169

171170
compositeDisposable = new CompositeDisposable();
172171
init();
172+
binding.rlContainerTitle.setOnClickListener(v -> onRlContainerTitleClicked());
173173
nearbyPopupAnswers = new HashMap<>();
174174
//getting the current dpi of the device and if it is less than 320dp i.e. overlapping
175175
//threshold, thumbnails automatically minimizes
@@ -872,7 +872,7 @@ public int getItemPosition(Object object) {
872872
}
873873

874874

875-
@OnClick(R.id.rl_container_title)
875+
876876
public void onRlContainerTitleClicked() {
877877
binding.rvThumbnails.setVisibility(isTitleExpanded ? View.GONE : View.VISIBLE);
878878
isTitleExpanded = !isTitleExpanded;

gradle.properties

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ org.gradle.caching=true
1818
android.enableR8.fullMode=false
1919

2020
KOTLIN_VERSION=1.7.20
21-
BUTTERKNIFE_VERSION=10.1.0
2221
LEAK_CANARY_VERSION=2.10
2322
DAGGER_VERSION=2.23
2423
ROOM_VERSION=2.5.0

0 commit comments

Comments
 (0)