diff --git a/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/mypage/MyPageFragment.java b/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/mypage/MyPageFragment.java index 5531868..27380e1 100644 --- a/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/mypage/MyPageFragment.java +++ b/app/src/main/java/org/ntlab/acanthus_client/views/main_menu_ui/mypage/MyPageFragment.java @@ -37,7 +37,6 @@ public class MyPageFragment extends Fragment { private MyPageViewModel mypageViewModel; - private UserPageViewModel userPageViewModel; private FragmentMypageBinding binding; //----------------------------------------------------------------- @@ -183,7 +182,6 @@ loginNameText.setText(acanthus.getPreferenceName()); mypageViewModel = new ViewModelProvider(this).get(MyPageViewModel.class); mypageViewModel.init(acanthus); - userPageViewModel = new ViewModelProvider(this).get(UserPageViewModel.class); startObserve(); observeFollowsSize(acanthus.getPreferenceUid()); observeFollowersSize(acanthus.getPreferenceUid()); @@ -230,8 +228,8 @@ public void observeFollowsSize(Integer loginUid) { TextView followsSize = binding.followsSizeText; - userPageViewModel.getFollows(loginUid); - userPageViewModel.getFollowJson().observe(getViewLifecycleOwner(), new Observer() { + mypageViewModel.getMyFollows(loginUid); + mypageViewModel.getMyFollowJson().observe(getViewLifecycleOwner(), new Observer() { @Override public void onChanged(FollowJson followJson) { Integer size = followJson.getFollowUids().size(); @@ -245,8 +243,8 @@ public void observeFollowersSize(Integer loginUid) { TextView followersSize = binding.followersSizeText; - userPageViewModel.getFollowers(loginUid); - userPageViewModel.getFollowerJson().observe(getViewLifecycleOwner(), new Observer() { + mypageViewModel.getMyFollowers(loginUid); + mypageViewModel.getMyFollowerJson().observe(getViewLifecycleOwner(), new Observer() { @Override public void onChanged(FollowerJson followerJson) { Integer size = followerJson.getFollowerUids().size();