Skip to content

Commit

Permalink
Fix review comments.
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 219275e commit 50dd564
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions src/gui/tray/activitylistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ void ActivityListModel::startFetchJob()

void ActivityListModel::setFinalList(const ActivityList &finalList)
{
QMutexLocker locker(&_finalListMutex);
_finalList = finalList;

emit allConflictsChanged();
Expand Down Expand Up @@ -670,7 +669,6 @@ void ActivityListModel::removeActivityFromActivityList(const Activity &activity)
qCInfo(lcActivity) << "Trying to remove Activity/Notification/Error from view... ";

{
QMutexLocker locker(&_finalListMutex);
const auto index = _finalList.indexOf(activity);
if (index != -1) {
qCInfo(lcActivity) << "Activity/Notification/Error successfully removed from the list.";
Expand All @@ -697,7 +695,6 @@ void ActivityListModel::checkAndRemoveSeenActivities(const OCC::ActivityList &ne
{
ActivityList activitiesToRemove;
{
QMutexLocker locker(&_finalListMutex);
for (const auto &activity : _finalList) {
if (activity._objectType == QStringLiteral("chat") && !newActivities.contains(activity)) {
activitiesToRemove.push_back(activity);
Expand Down Expand Up @@ -961,7 +958,6 @@ void ActivityListModel::slotRefreshActivityInitial()
void ActivityListModel::slotRemoveAccount()
{
{
QMutexLocker locker(&_finalListMutex);
_finalList.clear();
}
_activityLists.clear();
Expand Down
1 change: 0 additions & 1 deletion src/gui/tray/activitylistmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ private slots:
ActivityList _listOfIgnoredFiles;
ActivityList _notificationErrorsLists;
ActivityList _finalList;
QMutex _finalListMutex;

QSet<qint64> _presentedActivities;

Expand Down
2 changes: 0 additions & 2 deletions src/gui/tray/usermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ void User::slotBuildNotificationDisplay(const ActivityList &list)

void User::slotNotificationFetchFinished()
{
QMutexLocker locker(&_isNotificationFetchRunningMutex);
_isNotificationFetchRunning = false;
}

Expand Down Expand Up @@ -451,7 +450,6 @@ void User::slotRefreshNotifications()
// start a server notification handler if no notification requests
// are running
if (_notificationRequestsRunning == 0) {
QMutexLocker locker(&_isNotificationFetchRunningMutex);
if (_isNotificationFetchRunning) {
qCDebug(lcActivity) << "Notification fetch is already running.";
return;
Expand Down
1 change: 0 additions & 1 deletion src/gui/tray/usermodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ private slots:

int _lastChatNotificationsReceivedCount = 0;

QMutex _isNotificationFetchRunningMutex;
bool _isNotificationFetchRunning = false;
};

Expand Down

0 comments on commit 50dd564

Please sign in to comment.