Commit 3933a343 authored by Thomas's avatar Thomas
Browse files

- Fix #1359 sort descendants correctly when opening intermediate reply

parent c2d2e407
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -316,10 +316,10 @@ public class FragmentMastodonContext extends Fragment {
        statuses.addAll(0, context.ancestors);
        statusAdapter.notifyItemRangeInserted(0, statusPosition);
        List<String> allParentIds = new ArrayList<>();
        for (Status ancestor : context.ancestors) {
            allParentIds.add(ancestor.id);
        }
        allParentIds.add(focusedStatus.id);
        for (int i = context.ancestors.size() - 1; i >= 0; i--) {
            allParentIds.add(context.ancestors.get(i).id);
        }
        List<Status> sortedDescendants = CommentDecorationHelper.sortDescendantsAsTree(context.descendants, allParentIds);
        SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity());
        boolean highlightNewComments = sharedpreferences.getBoolean(getString(R.string.SET_HIGHLIGHT_NEW_COMMENTS), true);