Skip to content
Snippets Groups Projects
Commit 5a26dd41 authored by Jawnnypoo's avatar Jawnnypoo
Browse files

Fix two places where data refresh was not actually refreshing

parent 607e531c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -256,6 +256,12 @@ public class AddUserActivity extends MorphActivity {
mUserSearch.setOnEditorActionListener(mSearchEditorActionListener);
mUserSearch.addTextChangedListener(mTextWatcher);
mAdapter = new UsersAdapter(mUserClickListener);
mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
loadData();
}
});
mRecyclerView.setAdapter(mAdapter);
mUserLinearLayoutManager = new GridLayoutManager(this, 2);
mUserLinearLayoutManager.setSpanSizeLookup(mAdapter.getSpanSizeLookup());
Loading
Loading
Loading
Loading
@@ -13,11 +13,10 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
 
import com.commit451.easycallback.EasyCallback;
import com.commit451.gitlab.App;
import com.commit451.gitlab.R;
import com.commit451.gitlab.adapter.UsersAdapter;
import com.commit451.easycallback.EasyCallback;
import com.commit451.gitlab.api.GitLabFactory;
import com.commit451.gitlab.model.api.UserBasic;
import com.commit451.gitlab.navigation.Navigator;
import com.commit451.gitlab.util.PaginationUtil;
Loading
Loading
@@ -120,6 +119,7 @@ public class UsersFragment extends ButterKnifeFragment {
if (getView() == null) {
return;
}
mSwipeRefreshLayout.setRefreshing(false);
mUsersAdapter.addData(response);
mNextPageUrl = PaginationUtil.parse(getResponse()).getNext();
mUsersAdapter.setLoading(false);
Loading
Loading
@@ -132,6 +132,7 @@ public class UsersFragment extends ButterKnifeFragment {
if (getView() == null) {
return;
}
mSwipeRefreshLayout.setRefreshing(false);
mUsersAdapter.setLoading(false);
}
};
Loading
Loading
Loading
Loading
@@ -86,7 +86,7 @@
<string name="hostname_title">Hostname did not match</string>
<string name="hostname_message">The hostname in the certificate did not match the hostname you are connecting to.\n\nThis could mean a hacker is trying to intercept your communications.\n\nIf you trust the certificate, press OK to continue.</string>
<string name="not_a_valid_url">Not a valid URL</string>
<string name="please_end_your_url_with_a_slash">Please end your url with a "/"</string>
<string name="please_end_your_url_with_a_slash">Please end your URL with a "/"</string>
<string name="not_a_valid_private_token">Not a valid private token</string>
<string name="realm_message">A username and password are being requested by the server.\nThe server says: \"%1$s\"</string>
<string name="already_logged_in">This account is already logged in</string>
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment