ArticleView: deduplicate expand-optional-parts code

This commit is contained in:
Igor Kushnir 2022-06-11 20:34:52 +03:00 committed by Abs62
parent e8a1358bce
commit de69036e9e

View file

@ -2516,15 +2516,7 @@ void ArticleView::showEvent( QShowEvent * ev )
void ArticleView::receiveExpandOptionalParts( bool expand )
{
if( expandOptionalParts != expand )
{
int n = getArticlesList().indexOf( getActiveArticleId() );
if( n > 0 )
articleToJump = getCurrentArticle();
emit setExpandMode( expand );
expandOptionalParts = expand;
reload();
}
switchExpandOptionalParts();
}
void ArticleView::switchExpandOptionalParts()