profile list: attach the touch helper only when editing profiles
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 27 Feb 2019 20:27:39 +0000 (22:27 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 27 Feb 2019 20:27:39 +0000 (22:27 +0200)
app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfilesRecyclerViewAdapter.java

index 01119d3..16bc932 100644 (file)
@@ -88,7 +88,7 @@ public class ProfilesRecyclerViewAdapter
     public void onAttachedToRecyclerView(@NonNull RecyclerView recyclerView) {
         super.onAttachedToRecyclerView(recyclerView);
         this.recyclerView = recyclerView;
-        rearrangeHelper.attachToRecyclerView(recyclerView);
+        if (editingProfiles) rearrangeHelper.attachToRecyclerView(recyclerView);
     }
     public boolean editingProfiles() {
         return this.editingProfiles;