Browse Source

Merge pull request #1229 from raniapl/stamatiap/fixissue1075

fix highlight title - issue #1075
renovate/org.robolectric-robolectric-4.x
Austin Huang 4 years ago
committed by GitHub
parent
commit
1e2cf4f3a9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java

7
app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java

@ -119,6 +119,7 @@ public class StoryViewerFragment extends Fragment {
private View root; private View root;
private FragmentStoryViewerBinding binding; private FragmentStoryViewerBinding binding;
private String currentStoryUsername; private String currentStoryUsername;
private String highlightTitle;
private StoriesAdapter storiesAdapter; private StoriesAdapter storiesAdapter;
private SwipeEvent swipeEvent; private SwipeEvent swipeEvent;
private GestureDetectorCompat gestureDetector; private GestureDetectorCompat gestureDetector;
@ -724,7 +725,7 @@ public class StoryViewerFragment extends Fragment {
final HighlightModel model = models.get(currentFeedStoryIndex); final HighlightModel model = models.get(currentFeedStoryIndex);
currentStoryMediaId = model.getId(); currentStoryMediaId = model.getId();
fetchOptions = StoryViewerOptions.forHighlight(model.getId()); fetchOptions = StoryViewerOptions.forHighlight(model.getId());
currentStoryUsername = model.getTitle();
highlightTitle = model.getTitle();
break; break;
} }
case FEED_STORY_POSITION: { case FEED_STORY_POSITION: {
@ -824,8 +825,8 @@ public class StoryViewerFragment extends Fragment {
if (type == Type.HIGHLIGHT) { if (type == Type.HIGHLIGHT) {
final ActionBar actionBar = fragmentActivity.getSupportActionBar(); final ActionBar actionBar = fragmentActivity.getSupportActionBar();
if (actionBar != null) { if (actionBar != null) {
actionBarTitle = options.getName();
actionBar.setTitle(options.getName());
actionBarTitle = highlightTitle;
actionBar.setTitle(highlightTitle);
} }
} else if (hasUsername) { } else if (hasUsername) {
currentStoryUsername = currentStoryUsername.replace("@", ""); currentStoryUsername = currentStoryUsername.replace("@", "");

Loading…
Cancel
Save