|
|
@ -41,7 +41,7 @@ import awais.instagrabber.webservices.ServiceCallback; |
|
|
|
import static awais.instagrabber.utils.Utils.settingsHelper; |
|
|
|
|
|
|
|
public class SavedCollectionsFragment extends Fragment implements SwipeRefreshLayout.OnRefreshListener { |
|
|
|
private static final String TAG = "SavedCollectionsFragment"; |
|
|
|
private static final String TAG = SavedCollectionsFragment.class.getSimpleName(); |
|
|
|
public static boolean pleaseRefresh = false; |
|
|
|
|
|
|
|
private MainActivity fragmentActivity; |
|
|
@ -147,13 +147,16 @@ public class SavedCollectionsFragment extends Fragment implements SwipeRefreshLa |
|
|
|
if (isSaving) { |
|
|
|
setNavControllerResult(navController, topicCluster.getId()); |
|
|
|
navController.navigateUp(); |
|
|
|
} |
|
|
|
else { |
|
|
|
final FragmentNavigator.Extras.Builder builder = new FragmentNavigator.Extras.Builder() |
|
|
|
.addSharedElement(cover, "collection-" + topicCluster.getId()); |
|
|
|
final SavedCollectionsFragmentDirections.ActionSavedCollectionsFragmentToCollectionPostsFragment action = SavedCollectionsFragmentDirections |
|
|
|
.actionSavedCollectionsFragmentToCollectionPostsFragment(topicCluster, titleColor, backgroundColor); |
|
|
|
navController.navigate(action, builder.build()); |
|
|
|
} else { |
|
|
|
try { |
|
|
|
final FragmentNavigator.Extras.Builder builder = new FragmentNavigator.Extras.Builder() |
|
|
|
.addSharedElement(cover, "collection-" + topicCluster.getId()); |
|
|
|
final SavedCollectionsFragmentDirections.ActionSavedCollectionsFragmentToCollectionPostsFragment action = SavedCollectionsFragmentDirections |
|
|
|
.actionSavedCollectionsFragmentToCollectionPostsFragment(topicCluster, titleColor, backgroundColor); |
|
|
|
navController.navigate(action, builder.build()); |
|
|
|
} catch (Exception e) { |
|
|
|
Log.e(TAG, "setupTopics: ", e); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
binding.topicsRecyclerView.setAdapter(adapter); |
|
|
|