Fix issue #3
This commit is contained in:
parent
ce7b0d4d7d
commit
d946451b27
|
@ -9,3 +9,5 @@
|
||||||
.cxx
|
.cxx
|
||||||
/app/release/
|
/app/release/
|
||||||
/app/fdroid_full/release/
|
/app/fdroid_full/release/
|
||||||
|
/app/google_full/
|
||||||
|
/app/google_acad/
|
||||||
|
|
|
@ -170,18 +170,33 @@ public class DisplayStatusFragment extends Fragment implements AccountsHorizonta
|
||||||
viewModelSearch.getVideos("0", search_peertube).observe(DisplayStatusFragment.this.requireActivity(), this::manageVIewVideos);
|
viewModelSearch.getVideos("0", search_peertube).observe(DisplayStatusFragment.this.requireActivity(), this::manageVIewVideos);
|
||||||
}
|
}
|
||||||
|
|
||||||
lv_accounts.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
if (mLayoutManager != null) {
|
||||||
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
|
lv_accounts.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||||
int firstVisibleItem = mLayoutManager.findFirstVisibleItemPosition();
|
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
|
||||||
if (dy > 0) {
|
int firstVisibleItem = mLayoutManager.findFirstVisibleItemPosition();
|
||||||
int visibleItemCount = mLayoutManager.getChildCount();
|
if (dy > 0) {
|
||||||
int totalItemCount = mLayoutManager.getItemCount();
|
int visibleItemCount = mLayoutManager.getChildCount();
|
||||||
if (firstVisibleItem + visibleItemCount == totalItemCount && context != null) {
|
int totalItemCount = mLayoutManager.getItemCount();
|
||||||
viewModelAccounts.getAccounts(max_id_accounts, null, AccountsVM.accountFetch.SUBSCRIPTION).observe(DisplayStatusFragment.this.requireActivity(), apiResponse -> manageViewAccounts(apiResponse));
|
if (firstVisibleItem + visibleItemCount == totalItemCount && context != null) {
|
||||||
|
viewModelAccounts.getAccounts(max_id_accounts, null, AccountsVM.accountFetch.SUBSCRIPTION).observe(DisplayStatusFragment.this.requireActivity(), apiResponse -> manageViewAccounts(apiResponse));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
} else {
|
||||||
|
lv_accounts.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||||
|
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
|
||||||
|
int firstVisibleItem = gLayoutManager.findFirstVisibleItemPosition();
|
||||||
|
if (dy > 0) {
|
||||||
|
int visibleItemCount = gLayoutManager.getChildCount();
|
||||||
|
int totalItemCount = gLayoutManager.getItemCount();
|
||||||
|
if (firstVisibleItem + visibleItemCount == totalItemCount && context != null) {
|
||||||
|
viewModelAccounts.getAccounts(max_id_accounts, null, AccountsVM.accountFetch.SUBSCRIPTION).observe(DisplayStatusFragment.this.requireActivity(), apiResponse -> manageViewAccounts(apiResponse));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (type != POVERVIEW) {
|
if (type != POVERVIEW) {
|
||||||
|
|
Loading…
Reference in New Issue