only enabled for self user

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
This commit is contained in:
parneet-guraya 2024-12-17 14:48:23 +05:30
parent 8792e04ce2
commit dfe2471906
No known key found for this signature in database
GPG key ID: 63B807C4B2A9064B

View file

@ -191,9 +191,14 @@ public class ContributionsListFragment extends CommonsDaggerSupportFragment impl
initAdapter();
binding.swipeRefreshLayout.setOnRefreshListener(() -> {
contributionsListPresenter.refreshList(binding.swipeRefreshLayout);
});
// pull down to refresh only enabled for self user.
if(Objects.equals(sessionManager.getUserName(), userName)){
binding.swipeRefreshLayout.setOnRefreshListener(() -> {
contributionsListPresenter.refreshList(binding.swipeRefreshLayout);
});
} else {
binding.swipeRefreshLayout.setEnabled(false);
}
return binding.getRoot();
}