Fix extra empty line when adding a new feed to a new folder
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:
- Create a new folder
- Add a feed to it
After modification
Edited by Wendi Gan