Skip to content

Fix extra empty line when adding a new feed to a new folder

Wendi Gan requested to merge gwdx/akregator:fix-empty-line into master

When a new folder is created and a feed or folder is inserted into it, an extra empty line appears.

This happens because, in Folder::insertChild and Folder::prependChild, the node is added to m_children first. If the folder is newly created, during SubscriptionListModel::subscriptionAdded, QSortFilterProxyModelPrivate::create_mapping calls SubscriptionListModel::rowCount, which counts one extra row, leading to an extra empty line.

This commit modifies SubscriptionListModel::rowCount to decrement by 1 during insertion, to fix the extra empty line.

BUG: 407935
BUG: 412215
BUG: 420797

Screenshots

Before modification

steps to reproduce:

  1. Create a new folder
  2. Add a feed to it

before

After modification

after

Edited by Wendi Gan

Merge request reports

Loading