Sort & count list of 3-element tuples by second and third value of a tuple

I have such list of tuples [(1, ‘project1’, ‘errorMessage1’), (1, ‘project1’, ‘errorMessage1’), (1, ‘project2’, ‘errorMessage1’), (1, ‘project3’, ‘errorMessage2’)] I would like to count first column by distinct project and errorMessage, like this: [(2, ‘project1’, ‘errorMessage1’), (1, ‘project2’, ‘errorMessage1’), (1, ‘project3’, ‘errorMessage3′)] I tried Counter, and some other stuff but don’t see how should I approach…

Details

How are fragments destroyed which are created with fragmentstateadapter (viewpager2)

In a static (3 pages) ViewPager2 setup where the ViewPager2 is situated in a fragment, I have created 3 fragments in the FragmentStateAdapter descendant. I have even collected the fragments in a table ( MutableList<Fragment> = Vector<Fragment>()) in that descendant for later reference. The offscreenPageLimit is set to 3, so the fragments will not die,…

Details