diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-07-17 16:02:50 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-07-17 16:02:50 +0300 |
commit | bba2396ab3679802cbfbdf4e47dac835eb96127a (patch) | |
tree | 9d2199e3ebdf1f1ee05c435fbbba4a6df27a9510 /app/src/main/java/it/niedermann/nextcloud/deck/ui/stack | |
parent | b2ae7f97aee637c68d39bbcdcec53a60a120b014 (diff) |
#515 Reduce amount of data which is queried by the database
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/stack')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackAdapter.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackAdapter.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackAdapter.java index e2cc83372..4fe61794a 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackAdapter.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackAdapter.java @@ -8,11 +8,11 @@ import androidx.viewpager2.adapter.FragmentStateAdapter; import java.util.ArrayList; import java.util.List; -import it.niedermann.nextcloud.deck.model.full.FullStack; +import it.niedermann.nextcloud.deck.model.Stack; public class StackAdapter extends FragmentStateAdapter { @NonNull - private List<FullStack> stackList = new ArrayList<>(); + private List<Stack> stackList = new ArrayList<>(); public StackAdapter(@NonNull FragmentActivity fragmentActivity) { super(fragmentActivity); @@ -23,7 +23,7 @@ public class StackAdapter extends FragmentStateAdapter { return stackList.size(); } - public FullStack getItem(int position) { + public Stack getItem(int position) { return stackList.get(position); } @@ -34,7 +34,7 @@ public class StackAdapter extends FragmentStateAdapter { @Override public boolean containsItem(long itemId) { - for (FullStack stack : stackList) { + for (Stack stack : stackList) { if (stack.getLocalId() == itemId) { return true; } @@ -48,9 +48,9 @@ public class StackAdapter extends FragmentStateAdapter { return StackFragment.newInstance(stackList.get(position).getLocalId()); } - public void setStacks(@NonNull List<FullStack> fullStacks) { + public void setStacks(@NonNull List<Stack> stacks) { this.stackList.clear(); - this.stackList.addAll(fullStacks); + this.stackList.addAll(stacks); notifyDataSetChanged(); } }
\ No newline at end of file |