Skip to content

[FEATURE REQUEST] Pull to refresh in the member list#4801

Open
rohan-jadhav-dev wants to merge 1 commit intoowncloud:masterfrom
rohan-jadhav-dev:fix/pull-to-refresh-space-members-4773
Open

[FEATURE REQUEST] Pull to refresh in the member list#4801
rohan-jadhav-dev wants to merge 1 commit intoowncloud:masterfrom
rohan-jadhav-dev:fix/pull-to-refresh-space-members-4773

Conversation

@rohan-jadhav-dev
Copy link

Summary

Fixes #4773

Changes

  • Wrapped NestedScrollView with SwipeRefreshLayout in members_fragment.xml
  • Added pull to refresh listener in SpaceMembersFragment.kt
  • Refresh spinner shows when loading
  • Spinner disappears when loading is complete

Testing

  • Opened Space members list
  • Pulled down on the list
  • Refresh spinner appeared
  • List reloaded without navigating away
  • Spinner disappeared after loading

Screenshots

refresh.action.Video.mp4

@jesmrec
Copy link
Collaborator

jesmrec commented Mar 6, 2026

hi @rohan-jadhav-dev !! you can apply here the 4800 learnings to improve and be alligned with the repo structure and merging requirements.

In this PR, our static code analyzer (Detekt) is also red ❌ . By checking the log, this is the problem:

/home/runner/work/android/android/owncloudApp/src/main/java/com/owncloud/android/presentation/spaces/members/SpaceMembersFragment.kt:174:17: The function subscribeToViewModels is too long (103). The maximum length is 100. [LongMethod]

There is one function that overflows the maximum number of lines (100), so, that needs some refactor. Let us know if you need help with that or any other task. Detekt is a required check to pass for merging.

Thanks for your engagement!!

@rohan-jadhav-dev rohan-jadhav-dev force-pushed the fix/pull-to-refresh-space-members-4773 branch from c3adf72 to 01230a9 Compare March 6, 2026 17:21
@rohan-jadhav-dev rohan-jadhav-dev force-pushed the fix/pull-to-refresh-space-members-4773 branch from 01230a9 to df25ba6 Compare March 6, 2026 17:22
@joragua joragua changed the title Add pull to refresh in space members list #4773 [FEATURE REQUEST] Pull to refresh in the member list Mar 10, 2026
Copy link
Collaborator

@joragua joragua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done @rohan-jadhav-dev! 👍🏻 Thanks for your contribution! Some comments and suggestions about your PR

  1. Missing changelog file. You can take a look at TEMPLATE.md to follow the guidelines and keep the changelog consistent. I'd use the chore: prefix for the commit.

  2. Be careful with Detekt workflow. As you can see at the end of the PR, Detekt workflow is failing ❌ and it's required for merging. You can check the logs, but there is an unused import in SpaceMembersFragment.kt

  3. Since this is not a fix (the issue is marked with [FEATURE REQUEST] label), I'd use feat: prefix for the commit instead of fix:

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing blank line at the end of the file (Detekt is also reporting this)

Comment on lines +106 to +108
binding.swipeRefreshMembers.setOnRefreshListener {
spaceMembersViewModel.getSpaceMembers()
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you take into account that permissions also need to be refreshed? That means the user role can change while the refreshing is happening. For example, if a user changes from Manager to Viewer, actions icons such as trash, edit or add should no longer be displayed. 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the indentation of the layouts: NestedScrollView should be the parent of LinearLayout. The XML structure should look like this:

<SwipeRefreshLayout>
    <NestedScrollView>
        <LinearLayout>
            ...
        </LinearLayout>
    </NestedScrollView>
</SwipeRefreshLayout>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] Pull to refresh in the member list

3 participants