Skip to content

Commit

Permalink
Fix review comments I.
Browse files Browse the repository at this point in the history
Signed-off-by: alex-z <[email protected]>
  • Loading branch information
allexzander committed Jul 17, 2023
1 parent 50dd564 commit c80206c
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/gui/tray/activitylistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -668,16 +668,14 @@ void ActivityListModel::removeActivityFromActivityList(const Activity &activity)
qCInfo(lcActivity) << "Activity/Notification/Error successfully dismissed: " << activity._subject;
qCInfo(lcActivity) << "Trying to remove Activity/Notification/Error from view... ";

{
const auto index = _finalList.indexOf(activity);
if (index != -1) {
qCInfo(lcActivity) << "Activity/Notification/Error successfully removed from the list.";
qCInfo(lcActivity) << "Updating Activity/Notification/Error view.";

beginRemoveRows({}, index, index);
_finalList.removeAt(index);
endRemoveRows();
}
const auto index = _finalList.indexOf(activity);
if (index != -1) {
qCInfo(lcActivity) << "Activity/Notification/Error successfully removed from the list.";
qCInfo(lcActivity) << "Updating Activity/Notification/Error view.";

beginRemoveRows({}, index, index);
_finalList.removeAt(index);
endRemoveRows();
}

if (activity._type != Activity::ActivityType &&
Expand Down Expand Up @@ -957,9 +955,7 @@ void ActivityListModel::slotRefreshActivityInitial()

void ActivityListModel::slotRemoveAccount()
{
{
_finalList.clear();
}
_finalList.clear();
_activityLists.clear();
_presentedActivities.clear();
setAndRefreshCurrentlyFetching(false);
Expand Down

0 comments on commit c80206c

Please sign in to comment.