diff --git a/client.qrc b/client.qrc
index de385dfb20..bb284644a9 100644
--- a/client.qrc
+++ b/client.qrc
@@ -30,7 +30,10 @@
resources/copy.svg
resources/state-sync.svg
resources/add.png
+ resources/add-color.svg
resources/state-info.svg
+ resources/change.svg
+ resources/delete-color.svg
diff --git a/resources/add-color.svg b/resources/add-color.svg
new file mode 100644
index 0000000000..cb4596ac1e
--- /dev/null
+++ b/resources/add-color.svg
@@ -0,0 +1 @@
+
diff --git a/resources/change.svg b/resources/change.svg
new file mode 100644
index 0000000000..12071422b7
--- /dev/null
+++ b/resources/change.svg
@@ -0,0 +1 @@
+
diff --git a/resources/delete-color.svg b/resources/delete-color.svg
new file mode 100644
index 0000000000..72aed6b937
--- /dev/null
+++ b/resources/delete-color.svg
@@ -0,0 +1 @@
+
diff --git a/src/gui/tray/ActivityListModel.cpp b/src/gui/tray/ActivityListModel.cpp
index 88f967f6df..dd724acb0e 100644
--- a/src/gui/tray/ActivityListModel.cpp
+++ b/src/gui/tray/ActivityListModel.cpp
@@ -133,7 +133,14 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
} else if (a._status == SyncFileItem::FileIgnored) {
return "qrc:///client/theme/black/state-info.svg";
} else {
- return "qrc:///client/theme/black/state-sync.svg";
+ // File sync successful
+ if (a._fileAction == "file_created") {
+ return "qrc:///client/resources/add-color.svg";
+ } else if (a._fileAction == "file_deleted") {
+ return "qrc:///client/resources/delete-color.svg";
+ } else {
+ return "qrc:///client/resources/change.svg";
+ }
}
} else {
// We have an activity
@@ -209,7 +216,6 @@ void ActivityListModel::startFetchJob()
if (!_accountState->isConnected()) {
return;
}
- //JsonApiJob *job = new JsonApiJob(_accountState->account(), QLatin1String("ocs/v2.php/cloud/activity"), this);
JsonApiJob *job = new JsonApiJob(_accountState->account(), QLatin1String("ocs/v2.php/apps/activity/api/v2/activity"), this);
QObject::connect(job, &JsonApiJob::jsonReceived,
this, &ActivityListModel::slotActivitiesReceived);
diff --git a/src/gui/tray/UserModel.cpp b/src/gui/tray/UserModel.cpp
index ae9b42653f..c0163876ce 100644
--- a/src/gui/tray/UserModel.cpp
+++ b/src/gui/tray/UserModel.cpp
@@ -341,11 +341,32 @@ void User::slotItemCompleted(const QString &folder, const SyncFileItemPtr &item)
activity._accName = folderInstance->accountState()->account()->displayName();
activity._file = item->_file;
activity._folder = folder;
+ activity._fileAction = "";
+
+ if (item->_instruction == CSYNC_INSTRUCTION_REMOVE) {
+ activity._fileAction = "file_deleted";
+ } else if (item->_instruction == CSYNC_INSTRUCTION_NEW) {
+ activity._fileAction = "file_created";
+ } else if (item->_instruction == CSYNC_INSTRUCTION_RENAME) {
+ activity._fileAction = "file_renamed";
+ } else {
+ activity._fileAction = "file_changed";
+ }
+
if (item->_status == SyncFileItem::NoStatus || item->_status == SyncFileItem::Success) {
qCWarning(lcActivity) << "Item " << item->_file << " retrieved successfully.";
- activity._message.prepend(" ");
- activity._message.prepend(tr("Synced"));
+
+ if (activity._fileAction == "file_renamed") {
+ activity._message.prepend(tr("You renamed") + " ");
+ } else if (activity._fileAction == "file_deleted") {
+ activity._message.prepend(tr("You deleted") + " ");
+ } else if (activity._fileAction == "file_created") {
+ activity._message.prepend(tr("You created") + " ");
+ } else {
+ activity._message.prepend(tr("You changed") + " ");
+ }
+
_activityModel->addSyncFileItemToActivityList(activity);
} else {
qCWarning(lcActivity) << "Item " << item->_file << " retrieved resulted in error " << item->_errorString;